Loading TOC...

cts.boostQuery

cts.boostQuery(
   $matching-query as cts.query,
   $boosting-query as cts.query
) as cts.boostQuery

Summary

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.

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.

Example

fn.subsequence(
 cts.search(
  cts.boostQuery(
      cts.wordQuery("George"),
      cts.wordQuery("Washington", null, 10.0)
  )), 1, 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.

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy