qbe.validate( example as Item ) as element()
This function validates a query by example.
Parameters | |
---|---|
example | A query by example for matching JSON documents. |
The return value is one of the following:
valid-query
element if the query is valid.
invalid-query
element reporting the detected issues
if the query is invalid.
const qbe = require('/MarkLogic/appservices/search/qbe.xqy'); qbe.validate({ title:{$word: 'sawyer'}, $and:[ {price:{$ge: 8.00}}, {price:{$lt: 10.00}} ] });
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.