MarkLogic 9 Product Documentation
cts.nearQueryDistance

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

Summary

Returns the distance used to construct the near query.

Parameters
query A query.

Example

const query = cts.nearQuery(
                 [cts.wordQuery("wanted"),
                 cts.wordQuery("unwanted")],
                 12);
cts.nearQueryDistance(query);
=> 12
Powered by MarkLogic Server | Terms of Use | Privacy Policy