Methods
# filter(query)
Append a filter clause or array of filter clauses
Parameters:
Name | Type | Description |
---|---|---|
query |
Object | array | query clauses |
- Source:
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 |
- Source:
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 |
- Source:
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 |
- Source:
Returns:
this
Example
new BoolQuery().should( [query clauses that should match] )
# toJSON() → {json}
Get a JSON representation of this object
- Source:
Returns:
- Type
- json
# toJson() → {json}
Get a JSON representation of this object
- Source:
Returns:
- Type
- json