Loading TOC...


   query as cts.query,
   [qualifier as String?]
) as ModifyPlan


This function matches and returns the uri, content, and score for documents.

query Qualifies and establishes the scores for a set of documents. The query can be a cts.query or a string as a shortcut for a cts.wordQuery.
qualifier Specifies a name for qualifying the column names.

Usage Notes

The op.fromSearchDocs function is a convenience for executing a op.fromSearch equivalent to:

function fromSearchDocs(query, qualifier) {
   return op.fromSearch(query, null, qualifier)
            .joinDocUri('uri', op.fragmentIdCol('fragmentId'))
            .joinDoc('doc', op.fragmentIdCol('fragmentId'))

See Also


// Get the documents for top 20 employees with experience related to design

const op = require('/MarkLogic/optic');

   op.fromSearchDocs(cts.jsonPropertyValueQuery('experience', 'design'))

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