I am writing Rest Extension for search, and this takes in parameters where to search in a JSON Nested document. I was able to do this by writing a custom constraint, and with this custom constraint then parse the search text and build the query..
Can we do the same for the sort-order as well? By the way, I mean that I build the sort-order for the search options based on the parameters that get passed..
I saw in one of the examples, where the do the following
let $options :=
<search:sort-order direction="descending" type="xs:gYear"
<search:attribute ns="" name="year"/>
search:search("lange sort:year", $options)
but even here there are kind of hard-coding which fields to sort. I want to do something like custom-constraint, where at run time I determine the sort-order columns..
Is this possible ??