1

I'm using Sitecore 9.0 with SXA 1.8. I've got a requirement to search PDF names and it's fields including custom fields (e.g. download title field). When I see the Solr index / Azure index, PDF names and its fields are not indexing into the SXA AggregatedContent computed index field. So, I've decided to add a custom computed index field and populated the content. But, I didn't find a way to make this computed index field content searchable. I tried to do it through Scope query and rules, But no luck.

Here is the process I'm following,

  1. Add a custom computed index field.
  2. Add the configuration as <field fieldName="_mediadownloadtitle" returnType="text" patch:source="brand.Foundation.Search.config"&gt; brand.Foundation.Search.ComputedFields.MediaDependentIndexField, brand.Foundation.Search </field>
  3. Add the Boosting rule and the scope query, Both are not satisfactory. Tried all combinations enter image description here
  4. Search query from log:

(((((((-hide_from_search_b:(True) *:*) AND _mediadownloadtitle_t:("test1234")) AND ((_path:(8e4103c8302c43b197aae65ef11fe4e1) AND searchable_b:(True)) OR _path:(525bed7f6ddb4d5c8a338f3bbc44de46))) AND sxacontent_txm:(*test1234*)) AND _language:(en)) AND _latestversion:(True)) AND ((_mediadownloadtitle_t:(test1234))^90 OR (-_name:("") _name:[* TO *])))

As the "sxacontent_txm" index field is applying with AND condition, So, it's not able to show any results even though its building a query for custom index field in Boosting rule or query builder.

Is there a way to make custom computed index field's content searchable in SXA.

1 Answer 1

3

I don't think the computed index will searchable in your case, by default SXA use a computed field sxacontent which use following implementation -

Sitecore.XA.Foundation.Search.ComputedFields.AggregatedContent 

using following config node -

<field fieldName="sxacontent" returnType="textCollection" type="Sitecore.XA.Foundation.Search.ComputedFields.AggregatedContent, Sitecore.XA.Foundation.Search">

If you want to add your custom implementation to include something in this by overriding the above config node.

1
  • Thank you it worked by overriding the AggregatedContent field. Aug 20, 2019 at 20:50

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.