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?
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.
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.
How does umbracoNaviHide effect Search Results
I'm using Examine for search...will umbracoNaviHide prevent your pages from showing up in search results?
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
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();
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?
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>
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
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.
Makes total since. Thanks Mike... I'll add the elements to my indexsets and rebuild my indexes and mark this post as according.
is working on a reply...