Dora
Dora

Reputation: 135

Sitecore Lucene index - exclude items by template

I have created a custom index and I want to exclude some items that are created from a known template. I setup this in the config but doesn't seem to work:

          <documentOptions type="Sitecore.ContentSearch.LuceneProvider.LuceneDocumentBuilderOptions, Sitecore.ContentSearch.LuceneProvider">
            <indexAllFields>true</indexAllFields>
            <exclude hint="list:AddExcludedTemplate">
              <templateId>{C4770867-35D0-4B09-8A02-9EC9CFBB60BA}</templateId>
            </exclude >               
          </documentOptions>

Any ideas?

Upvotes: 2

Views: 1165

Answers (1)

Adrian Iorgu
Adrian Iorgu

Reputation: 611

Depends which Sitecore version you are using. In Sitecore 8.1 the list:ExcludeTemplate was replaced by list:AddExcludedTemplate

http://www.sitecorecoffee.com/2016/01/sitecore-81-creating-custom-search-index.html

Upvotes: 3

Related Questions