1

I'm trying to get the latest item: sorted by the last modified item from the list of items (__Updated field)

I'm using SXA 10.2

sort query query under the rendring variant

1

1 Answer 1

1

By default the __Updated field is being excluded from the indexes.

If you check you config (showconfig.aspx) you will notice that the field is mentioned in

  • <exclude hint="list:AddExcludedField"> (This setting allows you to exclude fields from the index when the indexAllFields setting is set to true)
  • <exclude hint="list:AddExcludedFieldFromFullTextSearch">

So you must patch the index config to make sure the __Updated field is in your index, and also don't forget to check if it is sortable as that is not always the case.

After making changes to the config, don't forget to rebuild the indexes. And test your changes in the solr admin panel - easier and faster to detect issues related to index fields.

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.