cts:boost-query( $matching-query as cts:query, $boosting-query as cts:query ) as cts:boost-query
Returns a query specifying that matches to $matching-query
should have their search relevance scores boosted if they also match
$boosting-query
.
Parameters | |
---|---|
matching-query | A sub-query that is used for match and scoring. |
boosting-query | A sub-query that is used only for boosting score. |
When used in a search, $boosting-query
is not evaluated
if there are no matches to $matching-query
.
When used in a search, all matches to $matching-query
are included in the search results. $boosting-query
only contributes to search relevances scores. Scoring is done the same
way as for a cts:and-query
.
cts:search(fn:collection(), cts:boost-query(cts:word-query("George"), cts:word-query("Washington", (), 10.0) ) )[1 to 10] => The first 10 documents containing the word "George". Those documents that also contain the word "Washington" have a higher relevance score than those elements that do not.