Hi,
I have created a search index for ReturnAuthorizations in Litium 8. It uses Tags like ProductDocument for filtering in frontend for return administrators, like this:
[Nested]
public List<TagItem> Tags { get; set; } = new List<TagItem>();
public class TagItem
{
[Keyword]
public string Key { get; set; }
[Keyword(EagerGlobalOrdinals = true)]
public string Value { get; set; }
}
I wish to sort the search based on a value in the tags list, can I do this?
I can always not use the Tags-structure, and duplicate the sortable fields onto the Document itself, then I know how to sort, but duplicated data is not nice. I use the tag structure because then I can reuse the accelerator code for filtering on tags.
Lets say I want to sort on a tag called “CountryCode”
public IPromise<IList> BuildSorting(Nest.SortDescriptor sortDescriptor, SearchQuery searchQuery)
{
var s = sortDescriptor;
… and then?
thanks,
Martin