Loading TOC...
Matches for cat:function have been highlighted. remove

MarkLogic Server 11.0 Product Documentation
cts.nearQueryQueries

cts.nearQueryQueries(
   query as cts.nearQuery
) as Sequence

Summary

Returns the query sequence used to construct the near query.

Parameters
query A query.

Example

  cts.nearQueryQueries(query)
  => ... a Sequence of the queries used to
            construct this query

Example

const query =
  cts.nearQuery([
    cts.wordQuery("to be or"),
    cts.wordQuery("or not to be")]);
const res = new Array();
for (const x of cts.nearQueryQueries(query)) {
  res.push(x);
};
res;

=> [{"wordQuery":{"text":["to be or"],"options":["lang=en"]}},
    {"wordQuery":{"text":["or not to be"],"options":["lang=en"]}}]

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