search.getDefaultOptions() as element(search.options)
This function returns the default options XML. Default options do not contain any constraints or anything else that requires specific index settings.
const search = require('/MarkLogic/appservices/search/search'); search.getDefaultOptions(); // ==> // <search:options xmlns:search="http://marklogic.com/appservices/search"> // ... // </search:options>
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.