1

I am using SXA 1.8 with Sitecore 9.0.2. I wanted to add a checklist facet to my search, as I am using Azure Search, I added the field to be indexed like below in a custom config file.

<include hint="list:AddIncludedField">
    <tenuretype_04D003C3>{04D003C3-7ABD-4872-9446-96AC743ED3DB} 
    </tenuretype_04D003C3>
</include>

Then I rebuild the indexes, the field is getting added to sitecore_master_index as tenuretype_s. The field name in sitecore is TenureType and is of type Droplist.

Then I create a checklist facet in below path /sitecore/content/Tenant/site/Settings/Facets/Tenure Type. In the "Field Name" field the value is tenuretype_s(same as the name in azure index file).

enter image description here

When adding on the page the facets doesn't load. On inspecting the request and response, the response is being read from sitecore_sxa_master_index. The field is not available in the below index. enter image description here

Am I missing anything ?

3 Answers 3

2

You have written that "field is getting added to sitecore_master_index" but SXA is using its own indexes - sitecore_sxa_master_index and sitecore_sxa_web_index.

enter image description here

Check if the field is present those indexes.

There is one more issue. In the field name skip type suffix, it will be automatically added by Azure Search logic (after discovering field type). Just put there: tenuretype.

1
  • thank you for the reply, i checked after removing the type suffix, its still not loading. Also the field is not available in sitecore_sxa_master_index, it gets added to sitecore_master_index. How to fix this ?
    – Fahmida
    Commented May 6, 2019 at 12:52
2

Based on your question, I think you may have added the config for the facet field to the wrong index. You have given the example:

<include hint="list:AddIncludedField">
    <tenuretype_04D003C3>{04D003C3-7ABD-4872-9446-96AC743ED3DB} 
    </tenuretype_04D003C3>
</include>

But you don't say which index this is adding the field too. It looks like you have probably added this to the sitecore_master_index, but you need to add it to the sitecore_sxa_master_index. That will make sure that your facet field is available in the correct index.

1

To quickly fix this issue, you need to go to $Path_To_Your_Sitecore_Instance$/App_Config\Modules\SXA\Z.Foundation.Overrides and open Sitecore.XA.Foundation.Search.Azure.config in text editor.

Add:

<include hint="list:AddIncludedField">
    <tenuretype_04D003C3>{04D003C3-7ABD-4872-9446-96AC743ED3DB} 
    </tenuretype_04D003C3>
</include>

right below node:

<documentOptions type="Sitecore.ContentSearch.DocumentBuilderOptions, Sitecore.ContentSearch">

Your Answer

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

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