I'm trying to allow a content editor to have the option to exclude items from a search page. There is a checkbox on the template being searched which indicates whether or not it should show up or not. I've seen a few answer that involve inheriting from Sitecore.Search.Crawlers.DatabaseCrawler and overriding the AddItem method (Excluding items selectively from Sitecore's Lucene search index - works when rebuilding with IndexViewer, but not when using Sitecore's built-in tools). This does not seem to be hit when rebuilding indexes from the control panel though. I have been able to hit a method in Sitecore.ContentSearch.SitecoreItemCrawler called RebuildFromRoot. Does anyone know exactly when the DatabaseCrawler method from that question is hit? I have a feeling I'll need to use both a custom SitecoreItemCrawler and DatabaseCrawler but I'm not positive. Any insight would be appreciated. I am using Sitecore 8.0 (rev. 150621).
相关问题
- How to pass “[Sitecore Mobile SDK] Data from the i
- JCR-SQL - contains function doesn't escape spe
- How can I remove duplicated page events in Sitecor
- Match lucene entire field exact value
- How to rank documents using tfidf similairty in lu
相关文章
- Solr - _version_ field must exist in schema and be
- CakePHP with Lucene
- Sitecore set/change default language from 'en&
- Sitecore OMS - achieving a goal on a form submissi
- Apache Lucene doesn't filter stop words despit
- Get number of components in placeholder, Sitecore
- Sort by date in Solr/Lucene performance problems
- What Solr tokenizer and filters can I use for a st
Inherit from the default Lucene crawler implementation in Sitecore and override the
IsExcludedFromIndex
method, returning true to exclude the item from being indexed:The
IndexUpdateNeedDelete
method is required to remove items from the index if an item in updated at a future date.Use a patch file to replace the crawler for which ever indexes you need.
You will have to rebuild the indexes afterwards (from the control panel is fine) so that the items are excluded.