Copied to clipboard

Flag this post as spam?

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


  • Kevon K. Hayes 255 posts 281 karma points
    Dec 07, 2011 @ 17:51
    Kevon K. Hayes
    0

    How does umbracoNaviHide effect Search Results

    I'm using Examine for search...will umbracoNaviHide prevent your pages from showing up in search results?

  • Mike Taylor 155 posts 353 karma points
    Dec 07, 2011 @ 17:55
    Mike Taylor
    0

    Only if you tell Examine to disregard nodes where umbracoNaviHide is set to True...

    How are you currently querying Examine to get your search results?

    Mike

  • Kevon K. Hayes 255 posts 281 karma points
    Dec 07, 2011 @ 18:13
    Kevon K. Hayes
    0

    Here's the code:

     

    var filter1 = criteria1.GroupedOr(new string[] { "nodeName", "corMasterDocPageTitle3","corHPMainContent","corLeftContent","corRightContent", "corBottomContent","corTabTitle1","corArticle1","corTabTitle2","corArticle2", "corTableTitle3","corArticle3","corTabTitle4","corArticle4","corMetaDescription",
    "corMasterDocMetaDataKeywords","corMasterCategories3" },SearchTerm).Not().Field("umbracoNaviHide", "1").Compile();

  • Mike Taylor 155 posts 353 karma points
    Dec 07, 2011 @ 18:15
    Mike Taylor
    0

    That looks like it's already disregarding nodes where umbracoNaviHide is set to 1. Have you added umbracoNaviHide to your IndexUserFields in your IndexSet in ExamineIndex.config?

  • Kevon K. Hayes 255 posts 281 karma points
    Dec 07, 2011 @ 18:23
    Kevon K. Hayes
    0

    No... should I an exclusion for it? If so how?

      <!--INDEXSETS BEGINS-->
      <IndexSet SetName="HomePageIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/HomePageIndex/">
        <IndexAttributeFields>
          <add Name="id" />
          <add Name="nodeName"/>
          <add Name="nodeTypeAlias" />
          <add Name="parentID" />
        </IndexAttributeFields>
        <IndexUserFields>
          <add Name="corMasterDocPageTitle3" />
          <add Name="corHPMainContent" />
          <add Name="corLeftContent" />
          <add Name="corRightContent" />
          <add Name="corBottomContent" />
          <add Name="corTabTitle1" />
          <add Name="corArticle1" />
          <add Name="corTabTitle2" />
          <add Name="corArticle2" />
          <add Name="corTabTitle3" />
          <add Name="corArticle3" />
          <add Name="corTabTitle4" />
          <add Name="corArticle4" />
          <add Name="corMetaDescription" />
          <add Name="corMasterDocMetaDataKeywords" />
          <add Name="corMasterCategories3" />
        </IndexUserFields>
        <IncludeNodeTypes/>
        <ExcludeNodeTypes />
      </IndexSet>

  • Mike Taylor 155 posts 353 karma points
    Dec 07, 2011 @ 18:27
    Mike Taylor
    0

    Just add an entry under <IndexUserFields> like this:

     <IndexUserFields>
          <add Name="umbracoNaviHide" />
          <add Name="corMasterDocPageTitle3" />
          <add Name="corHPMainContent" />
          <add Name="....etc 

    You'll need to rebuild your index I would think. This just adds the "umbracoNaviHide" field to your index. If it's not in the index, it can't be used as a basis for selection of matches.

    Mike

  • Sam 1 post 71 karma points
    Apr 27, 2017 @ 15:21
    Sam
    0

    Thank you for this info. It's just after reading this answer that I realized that is obvious if you want to filter with umbracoNaviHide that you have to add this field in the user search field.

  • Kevon K. Hayes 255 posts 281 karma points
    Dec 07, 2011 @ 18:37
    Kevon K. Hayes
    0

    Makes total since.  Thanks Mike... I'll add the elements to my indexsets and rebuild my indexes and mark this post as according.

Please Sign in or register to post replies

Write your reply to:

Draft