4

As per the title, during indexing, does Sitecore index the whole of the content tree (content, layout, media library, social, system, templates)? Is the section of the tree which is indexable configured somewhere, or is content to index controlled by configuring the template types to include/exclude?

7

If you are asking about the default Sitecore indexes, sitecore_master_index, sitecore_web_index and sitecore_web_index, then the entire Sitecore content tree is indexed.

The part of the tree to include in the index is set by the crawler/Root element in configuration:

<sitecore>
  <contentSearch>
    <configuration>
      <indexes hint="list:AddIndex">
        <index id="sitecore_master_index">
          <configuration ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration" />
          <locations hint="list:AddCrawler">
            <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
              <Database>master</Database>
              <Root>/sitecore</Root>
            </crawler>
          </locations>
        </index>
      </indexes>
    </configuration>
  </contentSearch>
</sitecore>

Note that the default is /sitecore, i.e. the entire tree. Also notice that the locations node has a hint list attribute. You can add multiple crawlers for different parts of the tree in the single index if you require.

Also depending on the configuration setting, items might not be included in the index if the documentOptions setting excludes specific templates for example. The above is using the defaultSolrIndexConfiguration which only excludes Bucket Folders. You should check your specific configuration to check the settings.

As a warning, do not restrict the Root setting of any of the default indexes. This will cause issues with parts of the internal application that rely on these indexes to function correctly, such as the search boxes in the Content Editor, field with search (e.g. multilist with search) and the Experience Forms application listing directly relies on the index to show the list of created forms. Instead, create a custom index and update those settings as required.

0

Option 1: You can set include or exclude items based on template type in index configuration file.

Option 2: Add a field in base template like "DoNotIndex" to filter or limit your search result.

Option 3: Create a new index and in configuration set very specific node require to be indexed. For example "< Root>/sitecore/Home/MyNode< /Root>"

  • The bit about <Root> was the thing I was after. Thanks! – Matthew Dresser Jun 18 at 8:27
  • Great, then can you please give up vote. Thanks – S.Kazmi Jun 18 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.