Show / Hide Table of Contents

    SOLR index information

    This article describes the SOLR indexes used by Mercury. Please note that the index names and the configuration depends on the customer index configuration so it is possible that the index names and configuration doesn't match with your configuration. The master and web index will also be described together as they are functionally both the same. The only difference is the configured database where to fetch/crawl the items.

    SOLR indexes

    sitecore_master_index / sitecore_web_index

    This is the default main index of Sitecore and contains all the Sitecore items and all the Commerce items.

    <locations hint="list:AddCrawler">
       <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
          <Database>master</Database>
          <Root>/sitecore</Root>
       </crawler>
       <crawler type="Sitecore.Commerce.Connect.CommerceServer.Search.SelectedCatalogsCrawler, Sitecore.Commerce.Connect.CommerceServer">
          <Database>master</Database>
          <Root>/sitecore/Commerce/Catalog Management/Catalogs</Root>
       </crawler>
    </locations>
    

    The content editor uses this index to search for items (e.g. when using the search input box). The Mercury website uses this index to retrieve items which inherit from a specific template using the method TemplatePathResolver.GetItemsInheritingFromTemplate. This is done by querying on the _alltemplates field which contains all the base template id's computed during index time.

    <contentSearch>
          <indexConfigurations>
            <defaultSolrIndexConfiguration>
              <documentOptions>
                <fields hint="raw:AddComputedIndexField">
                  <field fieldName="_alltemplates" storageType="yes" indexType="untokenized">
                    Mercury.Foundation.Framework.Sitecore.Search.AllTemplates, Mercury.Foundation.Framework
                  </field>
                </fields>
              </documentOptions>
            </defaultSolrIndexConfiguration>
          </indexConfigurations>
        </contentSearch>
    

    sitecore_master_{site-name}_index / sitecore_web_{site-name}_index

    The site specific indexes contains only the Sitecore items of the specific site and the Commerce items of the configured catalogs for the site (see Catalog Settings)

    This is configured using the following index location configuration:

    <locations hint="list:AddCrawler">
       <crawler type="Sitecore.Commerce.Connect.CommerceServer.Search.SitecoreItemExclusionCrawler, Sitecore.Commerce.Connect.CommerceServer">
          <Database>master</Database>
          <Root>/sitecore/content/MySite</Root>
       </crawler>
       <crawler type="Mercury.Foundation.Catalog.DataAccess.SiteSpecificCatalogCrawler, Mercury.Foundation.Catalog">
          <Database>master</Database>
          <Root>/sitecore/Commerce/Catalog Management/Catalogs</Root>
          <Site>MySite</Site>
       </crawler>
    </locations>
    

    The Mercury website uses this index to get catalog items in the website e.g. on the product listing pages.

    commerce_products_master_index

    This is a default index of Sitecore Commerce and contains the Commerce items (see below configuration coming from a Commerce patch configuration file).

    <locations hint="list:AddCrawler">
       <crawler type="Sitecore.Commerce.Search.ProductItemCrawler, Sitecore.Commerce">
          <Database>master</Database>
          <Root>/sitecore/content/Product Repository</Root>
       </crawler>
       <crawler type="Sitecore.Commerce.Connect.CommerceServer.Search.AllCatalogsCrawler, Sitecore.Commerce.Connect.CommerceServer">
          <Database>master</Database>
          <Root>/sitecore/Commerce/Catalog Management/Catalogs</Root>
       </crawler>
    </locations>
    

    The the product image linking functionality of Mercury in the content editor uses this index.

    Advanced
    • Improve this Doc
    Back to top Copyright © 2015-2018 Aviva Solutions
    Generated by DocFX