BoolQuery

BoolQuery~ BoolQuery

# new BoolQuery()

Assemble Boolean query.
Example
new BoolQuery()

Methods

# filter(query)

Append a filter clause or array of filter clauses
Parameters:
Name Type Description
query Object | array query clauses
Returns:
this
Example
new BoolQuery().filter( [query clauses for filtering] )

# must(query)

Append a must clause or array of must clauses
Parameters:
Name Type Description
query Object | array query clauses
Returns:
this
Example
new BoolQuery().must( [query clauses that must match] )

# mustNot(query)

Append a mustNot clause or array of mustNot clauses
Parameters:
Name Type Description
query Object | array query clauses
Returns:
this
Example
new BoolQuery().mustNot( [query clauses that mustNot match] )

# should(query)

Append a should clause or array of should clauses
Parameters:
Name Type Description
query Object | array query clauses
Returns:
this
Example
new BoolQuery().should( [query clauses that should match] )

# toJSON() → {json}

Get a JSON representation of this object
Returns:
Type
json

# toJson() → {json}

Get a JSON representation of this object
Returns:
Type
json