In the solr portal, the new field is not displayed either in schema or in the search results.
Using XP 10.1 & XC 10.1 in my local machine.

  1. Created a new template using composer.

  2. Updated the data templates and refreshed the commerce cache in XP.

  3. Following this article, added these settings in C:\inetpub\wwwroot\CommerceMinions_Sc\wwwroot\data\Environments\PlugIn.Search.Solr.PolicySet-1.0.0.json

    { "$type": "Sitecore.Commerce.Plugin.Search.Solr.SolrIndexFieldConfiguration, Sitecore.Commerce.Plugin.Search.Solr", "Name": "StringPropertyIndexName", "Type": "System.String", "Handler": { "$type": "Sitecore.Commerce.Plugin.Catalog.ComposerFieldHandler,Sitecore.Commerce.Plugin.Catalog", "ComposerSource": { "ViewName": "Vehicle", "PropertyName": "StoreID" } } }

  4. Added this patch config.

  5. Rebuilt the master index.

  • 1
    Starting with SXC 9.3.0 and higher, commerce entities are indexed by Commerce Engine and not Sitecore. So, please follow the instructions listed under doc.sitecore.com/developers/100/sitecore-experience-commerce/en/… and then bootstrap your commerce engine. Once bootstrapped, restart all your commerce instances and then trigger the index rebuild. If you followed the instructions correctly, Solr should show the new custom fields information. Apr 22 at 16:34
  • Also, make sure the SolrIndexFieldConfiguration is added to both master and web indexes. They both are located in the same policy JSON file. Apr 22 at 16:35

Your Answer

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

Browse other questions tagged or ask your own question.