Configuration for a query as edited through the visual query builder UI, and the elastic search request it produces. Holds the jQuery QueryBuilder rules JSON, the elastic search query JSON generated from those rules, the fields, sorting and paging to apply, and any aggregations to run. getQueryToRun assembles all of this into the full search request body sent to elastic search. Attached to a QueryBean when a saved query was built or last edited with the query builder.


Properties

PropertyReturnsDescription
aggregationsList<String>The elastic search aggregation clauses, each as a JSON fragment, to run alongside the query.
aggregationsSourceList<String>The query builder's own representation of the configured aggregations, as used to redisplay and re-edit them in the UI.
fieldsList<String>The names of the stored fields to return for each search hit.
filtersList<QueryField>The fields available to filter on in the query builder UI, each with its type, index type and allowed operators.
orderStringThe sort direction applied to the fields in getOrderBy, for example "asc" or "desc".
orderByList<String>The names of the fields to sort results by, in priority order.
queryStringThe elastic search query JSON generated from the rules, used as the "query" clause of the request built by getQueryToRun.
queryToRunStringAssembles the full elastic search request body for this query: the stored fields to return, the query clause, any aggregations, the sort order, and the page size.
rulesStringThe jQuery QueryBuilder rules, as a JSON string, that this query's filter conditions were built from.
sizeIntegerThe maximum number of results to return.

Methods

getRules() · getQuery() · getFilters() · getQueryToRun() · getFields() · getSize() · getAggregations() · getAggregationsSource() · getOrder() · getOrderBy() · duplicate()

getRules()

Returns: String

The jQuery QueryBuilder rules, as a JSON string, that this query's filter conditions were built from.

getQuery()

Returns: String

The elastic search query JSON generated from the rules, used as the "query" clause of the request built by getQueryToRun.

getFilters()

Returns: List<QueryField>

The fields available to filter on in the query builder UI, each with its type, index type and allowed operators.

getQueryToRun()

Returns: String

Assembles the full elastic search request body for this query: the stored fields to return, the query clause, any aggregations, the sort order, and the page size.

getFields()

Returns: List<String>

The names of the stored fields to return for each search hit.

getSize()

Returns: Integer

The maximum number of results to return.

getAggregations()

Returns: List<String>

The elastic search aggregation clauses, each as a JSON fragment, to run alongside the query.

getAggregationsSource()

Returns: List<String>

The query builder's own representation of the configured aggregations, as used to redisplay and re-edit them in the UI.

getOrder()

Returns: String

The sort direction applied to the fields in getOrderBy, for example "asc" or "desc".

getOrderBy()

Returns: List<String>

The names of the fields to sort results by, in priority order.

duplicate()

Returns: QueryBuilderBean

Creates a deep copy of this query builder configuration. Used before mutating a configuration that may be shared with a cached Queries instance.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.