You can use cts:value-tuples() to form tuples. List the range index for the
sort first and the lexicon to be sorted second (for instance, date and then
Be aware that, if the sorting or sorted values occurs more than once in the
document, you'll get a tuple for the cross product over the document (that is,
the co-occurrence within the document).
The logtfidf score uses the document relevance to the query.
Hoping that helps,
[general-boun...@developer.marklogic.com] on behalf of Andreas Hubmer
Sent: Wednesday, September 21, 2016 5:04 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Sorting results of lexicon calls
All the lexicon functions (cts:uris, cts:element-values, ...) support the
options "ascending" and "descending" to define the sort order.
But sometimes I would like to sort the result of a lexicon call by some other
Example: I would like to get the URIs of all documents, ordered by some date
Can this be done with the lexicon functions?
I've seen that all the lexicon functions support the option "score-logtfidf".
What is the effect of that option and the other scoring options (in lexicon
calls)? I've tried it and I didn't get any different results.
Senior IT Consultant
EBCONT enterprise technologies GmbH
OUR TEAM IS YOUR SUCCESS
HG St.Pölten - FN 399978 d
General mailing list
Manage your subscription at: