I have a simple query that filter documents based on the value of a property and return their results.
eg :
var query = 'Yes'
const jsearch = require('/MarkLogic/jsearch');
const myPaths = { paths: ['/envelope/instance/entity'] };
result = jsearch.documents()
.where(jsearch.byExample({ property: query }))
.map({ extract: myPaths })
.result();
Is it possible to use MLCP or a MarkLogic API to save the results of this query as JSON? Compressed results?
Based on this documentation https://docs.marklogic.com/guide/mlcp/export#id_47556 it is possible to do so. But I don't know how to serialize a query that uses jsearch instead of cts.