Create or update a query ruleset | Elasticsearch API documentation (original) (raw)
Dismiss highlight Show more
Path parameters
- The unique identifier of the query ruleset to be created or updated.
application/json
Body Required
rules object | array[object]
Hide attributes Show attributes object
- Values are
pinned
orexclude
. criteria object | array[object]
The criteria that must be met for the rule to be applied. If multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.
Hide attributes Show attributes object
* Values are global
, exact
, exact_fuzzy
, fuzzy
, prefix
, suffix
, contains
, lt
, lte
, gt
, gte
, or always
.
* The metadata field to match against. This metadata will be used to match against match_criteria
sent in the rule. It is required for all criteria types except always
.
* The values to match against the metadata
field. Only one value must match for the criteria to be met. It is required for all criteria types except always
.
- Hide actions attributes Show actions attributes object
* The unique document IDs of the documents to apply the rule to. Only one ofids
ordocs
may be specified and at least one must be specified.
* The documents to apply the rule to. Only one ofids
ordocs
may be specified and at least one must be specified. There is a maximum value of 100 documents in a rule. You can specify the following attributes for each document:
*_index
: The index of the document to pin.
*_id
: The unique document ID.
Hide docs attributes Show docs attributes object
Responses
- 200 application/json
Hide response attribute Show response attribute object- Values are
created
,updated
,deleted
,not_found
, ornoop
.
- Values are