==Scoring==
The XQuery Full Text Recommendation allows for the usage of scoring modelsand values within queries, with scoring being completely implementation -defined.
BaseX offers an internal The scoring model which can of BaseX takes into consideration the number of found terms, their frequency in a text, and the length of a text. The shorter the input text is, the higher scores will be extended to: <pre class="brush:xquery">different application scenarios(: Score values: 1 0. 62 0.45 :)The for $text score $score of a full-in ("A", "A B", "A B C")[. contains text result is calculated "A"]order by taking the $score descendingreturn <hit score="{ format-number of found terms($score, "0.00") }">{ $text }</hit></pre> This simple approach has proven to consistently deliver good results, and their frequency in a single text node into accountparticular when little is known about the structure of the queried XML documents.Terms As scores will be ranked higher if implicitly bound to the boolean item of a full-text expression, they are found in short can also be made visible later by binding full-text results to a score variable: <pre class="brush:xquery">let $hits1 := //text[. contains text "A"]let $hits2 := //text nodes[.contains text "B"]let score $score := $hits1 and $hits2return $score</pre>
==Thesaurus==