Loading TOC...

search.unparse

search.unparse(
   $qtree as Node
) as Sequence

Summary

NOTE: This function is deprecated. Turn a serialized, annotated cts:query (typically from search:parse) back into query text according to the specified rules.

Parameters
$qtree A serialized and annotated cts:query, typically the result of a call to search:parse.

Usage Notes

You can only use search:unparse on an annotated cts:query. You can generate an annotated query by passing "cts:annotated-query" as the 3rd parameter of search:parse.

Example

const search = require('/MarkLogic/appservices/search/search');

search.unparse(
    search.parse('tag:technology AND format:pdf',
      search.getDefaultOptions(), 'cts:annotated-query'));

// ==>
// tag:technology AND format:pdf

   

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