cts:fitness( [$node as node()] ) as xs:float
Returns the fitness of a node, or of the context node if no node is provided. Fitness is a normalized measure of relevance that is based on how well a node matches the query issued, not taking into account the number of documents in which the query term(s) occur.
Parameters | |
---|---|
node |
A node. Typically this is an item in the result sequence of a
cts:search operation.
|
Fitness is similar to score, except that it is bounded.
It is similar to confidence, except that it is not influenced by term IDFs.
It is an xs:float
in the range of 0.0 to 1.0.
It does not include quality.
let $x := cts:search(collection(), "dog") return cts:fitness($x[1]) => Returns the fitness value for the first item in the search.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.