Loading TOC...

MarkLogic 12 EA 2 Product Documentation
cts.nearQueryWeight

cts.nearQueryWeight(
   query as cts.nearQuery
) as Number

Summary

Returns the weight with which the specified query was constructed.

Parameters
query A query.

Example

const query = cts.nearQuery(
                 [cts.wordQuery("wanted"),
                 cts.wordQuery("unwanted")],
                 12, "ordered", 5.0);
cts.nearQueryWeight(query);
  => 5.0

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