I have filter (checklist) on a page with facets set to SxATags. It is not pulling any tags. When I switch the facet to title, it does work. Please advice. After adding filter(checklist) and Search results components on page, I did rebuild the indexes as well. Please advice if I am missing any steps. I am on sitecore 9.0.2 with SxA 1.7.1. Thanks
I had the same issue. Other fields like:
site, or any custom computed field did work except
sxatags. It turned out I had to add the field to the
fieldNames node within my index configuration.
... <configuration ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration"> <fieldMap ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap"> <fieldNames hint="raw:AddFieldByFieldName"> <field fieldName="sxatags" returnType="stringCollection" /> </fieldNames> </fieldMap> </configuration> ...
UPDATE In my case it might be the result of indexing only the site home node and not including the templates.
According to the Sitecore documentation:
The default crawler path is
<Root>/sitecore</Root>. When you configure the item crawler paths in your custom indexes to use a different path than the default path (for example:
<Root>/sitecore/content/TenantA/SiteA/Home/NewFolder</Root>), this has the following impact:
- only items from that path are indexed
- your custom index will not contain templates
Missing templates in the index may impact the fields types resolving logic. In some cases, the field type may not be found and this can generate issues while searching or filtering results. To resolve this, you must manually define all custom fields in the configuration files so that Sitecore knows what types they use (string, integer, text, and so on).