Enrich Policies
- class elasticsearch.client.EnrichClient
To use this client, access
client.enrich
from anElasticsearch
client. For example:from elasticsearch import Elasticsearch # Create the client instance client = Elasticsearch(...) # Use the enrich client client.enrich.<method>(...)
- delete_policy(*, name, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None)
Delete an enrich policy. Deletes an existing enrich policy and its enrich index.
https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-enrich-policy-api.html
- Parameters:
- Return type:
- execute_policy(*, name, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, wait_for_completion=None)
Run an enrich policy. Create the enrich index for an existing enrich policy.
https://www.elastic.co/guide/en/elasticsearch/reference/8.18/execute-enrich-policy-api.html
- Parameters:
name (str) – Enrich policy to execute.
master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node.
wait_for_completion (bool | None) – If true, the request blocks other enrich policy execution requests until complete.
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- get_policy(*, name=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None)
Get an enrich policy. Returns information about an enrich policy.
https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-enrich-policy-api.html
- Parameters:
name (str | Sequence[str] | None) – Comma-separated list of enrich policy names used to limit the request. To return information for all enrich policies, omit this parameter.
master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node.
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- put_policy(*, name, error_trace=None, filter_path=None, geo_match=None, human=None, master_timeout=None, match=None, pretty=None, range=None, body=None)
Create an enrich policy. Creates an enrich policy.
https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-enrich-policy-api.html
- Parameters:
name (str) – Name of the enrich policy to create or update.
geo_match (Mapping[str, Any] | None) – Matches enrich data to incoming documents based on a geo_shape query.
master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a connection to the master node.
match (Mapping[str, Any] | None) – Matches enrich data to incoming documents based on a term query.
range (Mapping[str, Any] | None) – Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a term query.
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- stats(*, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None)
Get enrich stats. Returns enrich coordinator statistics and information about enrich policies that are currently executing.
https://www.elastic.co/guide/en/elasticsearch/reference/8.18/enrich-stats-api.html