Methods
# (static) matchPhraseQuery(params) → {Object}
Assemble a matchPhraseQuery fragment. Use this when you want to match a phrase exactly.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
Returns:
a query fragment
- Type
- Object
Example
matchPhraseQuery({ field: 'name.keyword', value: 'some text' })
# (static) matchQuery(params) → {Object}
Assemble a matchQuery fragment. Use this when you want to match a set of words with an operator (AND or OR) exactly.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
Returns:
a query fragment
- Type
- Object
Examples
matchQuery({ field: 'name.keyword', value: 'some text', operator: 'AND })
matchQuery({ field: 'name.keyword', value: 'some text', operator: 'OR})