Methods
# (static) rangeQuery(params) → {Object}
Assemble a rangeQuery fragment
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
||||||
parmas.value |
array | an array of bounds - [ min, max ] |
Returns:
a query fragment
- Type
- Object
Example
rangeQuery({ field: 'date', value: [ min, max] })
# (static) termQuery(params) → {Object}
Assemble a termQuery fragment. Use this when you want to match a term exactly - normally this is used on a keyword mapping.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
Returns:
a query fragment
- Type
- Object
Example
termQuery({ field: 'name.keyword', value: 'some text' })
# (static) wildcardQuery(params) → {Object}
Assemble a wildcardQuery fragment
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
Returns:
a query fragment
- Type
- Object
Example
wildcardQuery({ field: 'name.keyword', value: 'some text' })