Are you using the standard method within Umbraco to protect an area of the site? If so by default the ExternalIndexer should exclude protected and unpublished pages:
<!-- default external indexer, which excludes protected and unpublished pages-->
<add name="ExternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"/>
I've just done a little more investigation on this and it seems that the indexer correctly removes the node marked as protected but then indexes it's children.
The only way I have achieved this is to include the umbracoNaviHide (or some other property on the document type) in the search index, and then iterate through the search results and exclude any results that have the property set.
This won't index any document types with an alias of secretDocument
If you want more complex exclusions you'll need to write your own indexer - this isn't as hard as it seems as you can inherit from the base UmbracoContentIndexer and then override the AddDocument method. Within there you can add custom logic to decide what is indexed or not.
Exclude folder
Has anyone found an easy way to exclude pages from examin index.
I tried exclude node but with no luck. I have hidden area but these pages show up in search results.
thanks
Hi Griffi,
Are you using the standard method within Umbraco to protect an area of the site? If so by default the ExternalIndexer should exclude protected and unpublished pages:
If you want these pages to show for certain members this blog https://thecogworks.com/blog/posts/examiness-hints-and-tips-from-the-trenches-part-9-secure-searching/ may provide some help.
Hope that helps Andy
Hi,
I've just done a little more investigation on this and it seems that the indexer correctly removes the node marked as protected but then indexes it's children.
Not quite what I expected!
Andy
Hi,
Using the standard indexer does work but it appears as if you have to republish the folder of the now private content.
I've checked the External Index with Luke and after switching the node to private and republishing none of the child nodes are in the examine index!
Hope that helps Andy
Hi Griffi
The only way I have achieved this is to include the umbracoNaviHide (or some other property on the document type) in the search index, and then iterate through the search results and exclude any results that have the property set.
Not sure if there is a better way, but it works.
Nigel
In
ExamineIndex.config
(in /config/) you can exclude specific document types and fields from being indexed eg.This won't index any document types with an alias of
secretDocument
If you want more complex exclusions you'll need to write your own indexer - this isn't as hard as it seems as you can inherit from the base
UmbracoContentIndexer
and then override theAddDocument
method. Within there you can add custom logic to decide what is indexed or not.is working on a reply...