We are working on a new site and have created a new index for it. This index is similar to sitecore_sxa_web_index except for the root path. Instead of /sitecore, we have /sitecore/content/<Tenant Name>/<Site Name> as a path.

We are facing an issue where facets (SXA tags) are not being populated in CheckboxAccordianFilter but search results are properly populated.

There are no errors related to the search in a log file.

We tried to debug the code and observed that no facets are returned by the below line, facetItems workes fine.

facets = facetItems.Any()? FacetService.GetFacets(query, facetItems, model.Languages, out queryTimer) : new List<Facet>();

However, when we change the path to /sitecore we get the list of tags.

Here is the config for the custom index

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
  <sitecore role:require="Standalone or ContentDelivery or ContentManagement" search:require="solr">
      <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
        <indexes hint="list:AddIndex">
          <index id="someIndexName" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="name">$(id)</param>
            <param desc="core">SomeIndexCoreName</param>
            <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" />
            <configuration ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration" />
            <strategies hint="list:AddStrategy">
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsyncSingleInstance" />
            <locations hint="list:AddCrawler">
              <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">

Do we need to consider anything else while creating a custom index?

  • Where did you configure your facets? I'm assuming it's at the path: sitecore/content/Tenant/Site/Settings/Facets/ right or are you using the default ones from SXA? Nov 28, 2022 at 14:53
  • @SumitUpadhyay , yes, same location
    – Imad
    Nov 29, 2022 at 5:02
  • @Imad hope this will help you sitecore.stackexchange.com/questions/30522/… Jan 10, 2023 at 16:01


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.