Loading TOC...


   $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.

matching-query A sub-query that is used for match and scoring.
boosting-query A sub-query that is used only for boosting score.

Usage Notes

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.

See Also


                    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.

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.