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">
<contentSearch>
<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" />
</strategies>
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>web</Database>
<Root>/sitecore/content/<Tenant>/<Site></Root>
</crawler>
</locations>
<enableItemLanguageFallback>false</enableItemLanguageFallback>
<enableFieldLanguageFallback>false</enableFieldLanguageFallback>
</index>
</indexes>
</configuration>
</contentSearch>
</sitecore>
</configuration>
Do we need to consider anything else while creating a custom index?