Hi, Andreas:
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
uri):
http://docs.marklogic.com/cts:value-tuples
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,
Erik Hennum
________________________________
From: [email protected]
[[email protected]] on behalf of Andreas Hubmer
[[email protected]]
Sent: Wednesday, September 21, 2016 5:04 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Sorting results of lexicon calls
Hi,
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
range index.
Example: I would like to get the URIs of all documents, ordered by some date
element.
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.
Thanks,
Andreas
--
Andreas Hubmer
Senior IT Consultant
EBCONT enterprise technologies GmbH
Millennium Tower
Handelskai 94-96
A-1200 Vienna
OUR TEAM IS YOUR SUCCESS
UID-Nr. ATU68135644
HG St.Pölten - FN 399978 d
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general