2

I m using sitecore 9.0.1 with sxa 1.7,i have default sxa search component and wants to know whether we can search the data with field type droplist ,droplink ,tag tree list etc..Without adding any filters.

If possible how can we achieve that? Current search box is giving results for the single line text data type.

Thanks

1 Answer 1

0

By default SXA comes with a computed field sxacontent which is aggregating all texts from all fields of an item and uses the implementation in Sitecore.XA.Foundation.Search.ComputedFields.AggregatedContent. It is configured in \App_Config\Include\z.Foundation.Overrides\Sitecore.XA.Foundation.Search.Solr.config. Thanks to this there is no need to configure fields and other stuff, you just drop Search Box and Search Results on the page and search is working.

If I understand correctly from your question you would like to index content from the items selected in the droplink, tree list fields? You can add your own custom implementation if you override the configuration node <field fieldName="sxacontent" returnType="textCollection" type="Sitecore.XA.Foundation.Search.ComputedFields.AggregatedContent, Sitecore.XA.Foundation.Search">

2
  • Can you please explain what kind of changes need to make to that node in the config file because the said changes is already present in the config file.@Cristi Vulturar
    – Vinaya
    Mar 1, 2021 at 12:37
  • After you implement your custom implementation class you need to patch replace the value in type="Sitecore.XA.Foundation.Search.ComputedFields.AggregatedContent, Sitecore.XA.Foundation.Search" with type="YourCustom.Foundation.Search.ComputedFields.AggregatedContent, YourCustom.Foundation.Search" Mar 1, 2021 at 12:44

Your Answer

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

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