Query rules

class elasticsearch.client.QueryRulesetClient(client)
Parameters:

client (BaseClient)

delete(*, ruleset_id, error_trace=None, filter_path=None, human=None, pretty=None)

Deletes a query ruleset.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/delete-query-ruleset.html

Parameters:
  • ruleset_id (str) – The unique identifier of the query ruleset to delete

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

get(*, ruleset_id, error_trace=None, filter_path=None, human=None, pretty=None)

Returns the details about a query ruleset.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/get-query-ruleset.html

Parameters:
  • ruleset_id (str) – The unique identifier of the query ruleset

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

list(*, error_trace=None, filter_path=None, from_=None, human=None, pretty=None, size=None)

Lists query rulesets.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/list-query-rulesets.html

Parameters:
  • from – Starting offset (default: 0)

  • size (int | None) – specifies a max number of results to get

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • from_ (int | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

put(*, ruleset_id, rules=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)

Creates or updates a query ruleset.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/put-query-ruleset.html

Parameters:
Return type:

ObjectApiResponse[Any]