Loading TOC...

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}}
  ]
});
  

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