Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Linda 4 posts 34 karma points
    Aug 14, 2015 @ 01:31
    Linda
    0

    Adding custom fields to Examine ExternalIndexSet, but it's not working

    Hi all,

    I am trying to set up Examine Search in the Umbraco 7.2.2 for the particular user fields, but it’s still searching throughout the whole website contents. Why?

    The following code is set up in the “ExamineIndex.config”:

      <IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/">
    <IndexUserFields>
      <add Name="heading"/>
      <add Name="bodyText"/>
      <add Name="pageHeader"/>
      <add Name="summary"/>
      <add Name="readMore"/>
    </IndexUserFields> </IndexSet>
    

    Any hints appreciated.

  • Mark Bowser 272 posts 859 karma points c-trib
    Aug 14, 2015 @ 15:33
    Mark Bowser
    1

    Do you mean that it is indexing fields you don't want indexed? Or that it is indexing nodes you don't want indexed? To include/exclude nodes, from the external indexer, you can do things like this:

    <IncludeNodeTypes>
      <add Name="Product"/>
      <add Name="ProductCategory"/>
    </IncludeNodeTypes>
    <ExcludeNodeTypes>
      <add Name="HomePage" />
      <add Name="ContentPage" />
      <add Name="BlogPost" />
    </ExcludeNodeTypes>
    

    I'm pretty sure that after doing the above, your external indexer would only index Product and ProductCategory, so when you do a site search using the External Indexer, you would only get results from those two document types.

  • Linda 4 posts 34 karma points
    Aug 24, 2015 @ 05:13
    Linda
    0

    Appreciate for your help.

    However what I mean is not to index of some particular nodes, index of some content properties inside the node instead. For example, I only what to index the "bodyText" field rather than "alertText".

    Thanks

  • Robert Foster 455 posts 1790 karma points MVP admin c-trib
    Aug 24, 2015 @ 06:31
    Robert Foster
    100

    Hi Linda,

    You can't exclude fields from the index, you can only add fields.

    However, you can perform searches against specific fields in your search criteria. This article provides a good foundation for using Examine to perform searches and specify criteria:

    http://umbraco.com/follow-us/blog-archive/2011/9/16/examining-examine.aspx

Please Sign in or register to post replies

Write your reply to:

Draft