Loading TOC...
Matches for cat:function (cat:function/xquery (cat:function/xquery (cat:function (cat:function/xquery (cts:words))))) have been highlighted. remove

MarkLogic Server 11.0 Product Documentation
cts:near-query-weight

cts:near-query-weight(
   $query as cts:near-query
) as xs:double

Summary

Returns the weight with which the specified query was constructed.

Parameters
query A query.

Example

let $query := cts:near-query(
                 (cts:word-query("wanted"),
                 cts:word-query("unwanted")),
                 12, "ordered", 5.0)
return
  cts:near-query-weight($query)
  => 5.0

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