Hi @Vadiraj Rao thanks for the question.
The Freshness scoring function is not supported for fields of type Collections(Edm.ComplexType)
To sort search results based on the latest TimeSlot, you can use the $orderby parameter in your search query. However, since the number of slots for each document is variable, you cannot set up separate fields for each slot.
One approach to solve this problem is to create a new field in your index that contains the latest TimeSlot for each document. You can use an indexer skill to extract the latest TimeSlot from the TimeSlots field and populate the new field.
Once you have the new field, you can use the $orderby parameter to sort search results based on the new field.
Here are the high-level steps to implement this approach:
- Create a new field in your index to store the latest TimeSlot for each document.
- Use an indexer skill to extract the latest TimeSlot from the TimeSlots field and populate the new field.
- Use the $orderby parameter in your search query to sort search results based on the new field.
Hope this helps! Let us know if you have any further questions.
-Grace