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
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
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.