Loading TOC...

cts.reverseQueryWeight

cts.reverseQueryWeight(
   query as cts.reverseQuery
) as Number

Summary

Returns the weight with which the specified query was constructed.

Parameters
query A query.

Example

const doc = xdmp.toJSON({prop: "hello"});
const query = cts.wordQuery("hello");
let obj = new Object();
obj.query = query;
const rev = cts.reverseQuery(doc);
cts.reverseQueryWeight(rev);

  => 1

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