MarkLogic 10 Product Documentation
qbe.validate

qbe.validate(
   example as Item
) as element()

Summary

This function validates a query by example.

Parameters
example A query by example for matching JSON documents.

Usage Notes

The return value is one of the following:

Example

const qbe = require('/MarkLogic/appservices/search/qbe.xqy');

qbe.validate({
  title:{$word: 'sawyer'},
  $and:[
    {price:{$ge:  8.00}},
    {price:{$lt: 10.00}}
  ]
});
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy