Allows to export jQuery QueryBuilder rules as an Elasticsearch bool query.
- jQuery QueryBuilder >= 2.0
The plugin adds a new public method to all QueryBuilder instances.
Performs validation and returns the rules as a valid Elasticsearch bool query.
var esQuery = $('#builder').queryBuilder('getESBool');
The Elasticsearch plugin requires special configuration for operators to convert rules. This configuration is stored in the ESBoolOperators
option, see the source code for more details.
$ grunt test --verbose