repo stringclasses 85
values | path stringlengths 8 121 | func_name stringlengths 1 82 | original_string stringlengths 112 65.5k | language stringclasses 1
value | code stringlengths 112 65.5k | code_tokens listlengths 20 4.09k | docstring stringlengths 3 46.3k | docstring_tokens listlengths 1 564 | sha stringclasses 85
values | url stringlengths 93 218 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
elastic/elasticsearch-py | elasticsearch/helpers/actions.py | parallel_bulk | def parallel_bulk(
client,
actions,
thread_count=4,
chunk_size=500,
max_chunk_bytes=100 * 1024 * 1024,
queue_size=4,
expand_action_callback=expand_action,
*args,
**kwargs
):
"""
Parallel version of the bulk helper run in multiple threads at once.
:arg client: instance of... | python | def parallel_bulk(
client,
actions,
thread_count=4,
chunk_size=500,
max_chunk_bytes=100 * 1024 * 1024,
queue_size=4,
expand_action_callback=expand_action,
*args,
**kwargs
):
"""
Parallel version of the bulk helper run in multiple threads at once.
:arg client: instance of... | [
"def",
"parallel_bulk",
"(",
"client",
",",
"actions",
",",
"thread_count",
"=",
"4",
",",
"chunk_size",
"=",
"500",
",",
"max_chunk_bytes",
"=",
"100",
"*",
"1024",
"*",
"1024",
",",
"queue_size",
"=",
"4",
",",
"expand_action_callback",
"=",
"expand_action... | Parallel version of the bulk helper run in multiple threads at once.
:arg client: instance of :class:`~elasticsearch.Elasticsearch` to use
:arg actions: iterator containing the actions
:arg thread_count: size of the threadpool to use for the bulk requests
:arg chunk_size: number of docs in one chunk se... | [
"Parallel",
"version",
"of",
"the",
"bulk",
"helper",
"run",
"in",
"multiple",
"threads",
"at",
"once",
"."
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/helpers/actions.py#L312-L373 | train |
elastic/elasticsearch-py | elasticsearch/helpers/actions.py | scan | def scan(
client,
query=None,
scroll="5m",
raise_on_error=True,
preserve_order=False,
size=1000,
request_timeout=None,
clear_scroll=True,
scroll_kwargs=None,
**kwargs
):
"""
Simple abstraction on top of the
:meth:`~elasticsearch.Elasticsearch.scroll` api - a simple it... | python | def scan(
client,
query=None,
scroll="5m",
raise_on_error=True,
preserve_order=False,
size=1000,
request_timeout=None,
clear_scroll=True,
scroll_kwargs=None,
**kwargs
):
"""
Simple abstraction on top of the
:meth:`~elasticsearch.Elasticsearch.scroll` api - a simple it... | [
"def",
"scan",
"(",
"client",
",",
"query",
"=",
"None",
",",
"scroll",
"=",
"\"5m\"",
",",
"raise_on_error",
"=",
"True",
",",
"preserve_order",
"=",
"False",
",",
"size",
"=",
"1000",
",",
"request_timeout",
"=",
"None",
",",
"clear_scroll",
"=",
"True... | Simple abstraction on top of the
:meth:`~elasticsearch.Elasticsearch.scroll` api - a simple iterator that
yields all hits as returned by underlining scroll requests.
By default scan does not return results in any pre-determined order. To
have a standard order in the returned documents (either by score ... | [
"Simple",
"abstraction",
"on",
"top",
"of",
"the",
":",
"meth",
":",
"~elasticsearch",
".",
"Elasticsearch",
".",
"scroll",
"api",
"-",
"a",
"simple",
"iterator",
"that",
"yields",
"all",
"hits",
"as",
"returned",
"by",
"underlining",
"scroll",
"requests",
"... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/helpers/actions.py#L376-L468 | train |
elastic/elasticsearch-py | elasticsearch/helpers/actions.py | reindex | def reindex(
client,
source_index,
target_index,
query=None,
target_client=None,
chunk_size=500,
scroll="5m",
scan_kwargs={},
bulk_kwargs={},
):
"""
Reindex all documents from one index that satisfy a given query
to another, potentially (if `target_client` is specified) ... | python | def reindex(
client,
source_index,
target_index,
query=None,
target_client=None,
chunk_size=500,
scroll="5m",
scan_kwargs={},
bulk_kwargs={},
):
"""
Reindex all documents from one index that satisfy a given query
to another, potentially (if `target_client` is specified) ... | [
"def",
"reindex",
"(",
"client",
",",
"source_index",
",",
"target_index",
",",
"query",
"=",
"None",
",",
"target_client",
"=",
"None",
",",
"chunk_size",
"=",
"500",
",",
"scroll",
"=",
"\"5m\"",
",",
"scan_kwargs",
"=",
"{",
"}",
",",
"bulk_kwargs",
"... | Reindex all documents from one index that satisfy a given query
to another, potentially (if `target_client` is specified) on a different cluster.
If you don't specify the query you will reindex all the documents.
Since ``2.3`` a :meth:`~elasticsearch.Elasticsearch.reindex` api is
available as part of e... | [
"Reindex",
"all",
"documents",
"from",
"one",
"index",
"that",
"satisfy",
"a",
"given",
"query",
"to",
"another",
"potentially",
"(",
"if",
"target_client",
"is",
"specified",
")",
"on",
"a",
"different",
"cluster",
".",
"If",
"you",
"don",
"t",
"specify",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/helpers/actions.py#L471-L530 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/data_frame.py | Data_FrameClient.get_data_frame_transform | def get_data_frame_transform(self, transform_id=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform.html>`_
:arg transform_id: The id or comma delimited list of id expressions of
the transforms to get, '_all' or '*' impl... | python | def get_data_frame_transform(self, transform_id=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform.html>`_
:arg transform_id: The id or comma delimited list of id expressions of
the transforms to get, '_all' or '*' impl... | [
"def",
"get_data_frame_transform",
"(",
"self",
",",
"transform_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"\"_data_frame\"",
",",
"\"transforms\"",
... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform.html>`_
:arg transform_id: The id or comma delimited list of id expressions of
the transforms to get, '_all' or '*' implies get all transforms
:arg from_: skips a number of transform configs, defaults... | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"get",
"-",
"data",
"-",
"frame",
"-",
"transform",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/data_frame.py#L23-L34 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/data_frame.py | Data_FrameClient.get_data_frame_transform_stats | def get_data_frame_transform_stats(self, transform_id=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform-stats.html>`_
:arg transform_id: The id of the transform for which to get stats.
'_all' or '*' implies all transfo... | python | def get_data_frame_transform_stats(self, transform_id=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform-stats.html>`_
:arg transform_id: The id of the transform for which to get stats.
'_all' or '*' implies all transfo... | [
"def",
"get_data_frame_transform_stats",
"(",
"self",
",",
"transform_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"\"_data_frame\"",
",",
"\"transform... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform-stats.html>`_
:arg transform_id: The id of the transform for which to get stats.
'_all' or '*' implies all transforms | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"get",
"-",
"data",
"-",
"frame",
"-",
"transform",
"-",
"stats",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/data_frame.py#L37-L48 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/data_frame.py | Data_FrameClient.preview_data_frame_transform | def preview_data_frame_transform(self, body, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-data-frame-transform.html>`_
:arg body: The definition for the data_frame transform to preview
"""
if body in SKIP_IN_PATH:
raise ... | python | def preview_data_frame_transform(self, body, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-data-frame-transform.html>`_
:arg body: The definition for the data_frame transform to preview
"""
if body in SKIP_IN_PATH:
raise ... | [
"def",
"preview_data_frame_transform",
"(",
"self",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"if",
"body",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'body'.\"",
")",
"return",
"self",
".",
"transpo... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-data-frame-transform.html>`_
:arg body: The definition for the data_frame transform to preview | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"preview",
"-",
"data",
"-",
"frame",
"-",
"transform",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/data_frame.py#L51-L61 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/data_frame.py | Data_FrameClient.put_data_frame_transform | def put_data_frame_transform(self, transform_id, body, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/put-data-frame-transform.html>`_
:arg transform_id: The id of the new transform.
:arg body: The data frame transform definition
"""
... | python | def put_data_frame_transform(self, transform_id, body, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/put-data-frame-transform.html>`_
:arg transform_id: The id of the new transform.
:arg body: The data frame transform definition
"""
... | [
"def",
"put_data_frame_transform",
"(",
"self",
",",
"transform_id",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"transform_id",
",",
"body",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/put-data-frame-transform.html>`_
:arg transform_id: The id of the new transform.
:arg body: The data frame transform definition | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"put",
"-",
"data",
"-",
"frame",
"-",
"transform",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/data_frame.py#L64-L79 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/data_frame.py | Data_FrameClient.stop_data_frame_transform | def stop_data_frame_transform(self, transform_id, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-data-frame-transform.html>`_
:arg transform_id: The id of the transform to stop
:arg timeout: Controls the time to wait until the transform has stop... | python | def stop_data_frame_transform(self, transform_id, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-data-frame-transform.html>`_
:arg transform_id: The id of the transform to stop
:arg timeout: Controls the time to wait until the transform has stop... | [
"def",
"stop_data_frame_transform",
"(",
"self",
",",
"transform_id",
",",
"params",
"=",
"None",
")",
":",
"if",
"transform_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'transform_id'.\"",
")",
"return",
"sel... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-data-frame-transform.html>`_
:arg transform_id: The id of the transform to stop
:arg timeout: Controls the time to wait until the transform has stopped.
Default to 30 seconds
:arg wait_for_completion: Whether to ... | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"stop",
"-",
"data",
"-",
"frame",
"-",
"transform",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/data_frame.py#L100-L118 | train |
elastic/elasticsearch-py | elasticsearch/client/cat.py | CatClient.allocation | def allocation(self, node_id=None, params=None):
"""
Allocation provides a snapshot of how shards have located around the
cluster and the state of disk usage.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html>`_
:arg node_id: A comma-separated... | python | def allocation(self, node_id=None, params=None):
"""
Allocation provides a snapshot of how shards have located around the
cluster and the state of disk usage.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html>`_
:arg node_id: A comma-separated... | [
"def",
"allocation",
"(",
"self",
",",
"node_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_cat'",
",",
"'allocation'",
",",
"node_id",
")",
","... | Allocation provides a snapshot of how shards have located around the
cluster and the state of disk usage.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html>`_
:arg node_id: A comma-separated list of node IDs or names to limit the
returned informat... | [
"Allocation",
"provides",
"a",
"snapshot",
"of",
"how",
"shards",
"have",
"located",
"around",
"the",
"cluster",
"and",
"the",
"state",
"of",
"disk",
"usage",
".",
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"el... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cat.py#L27-L49 | train |
elastic/elasticsearch-py | elasticsearch/client/cat.py | CatClient.count | def count(self, index=None, params=None):
"""
Count provides quick access to the document count of the entire cluster,
or individual indices.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html>`_
:arg index: A comma-separated list of index names to ... | python | def count(self, index=None, params=None):
"""
Count provides quick access to the document count of the entire cluster,
or individual indices.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html>`_
:arg index: A comma-separated list of index names to ... | [
"def",
"count",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_cat'",
",",
"'count'",
",",
"index",
")",
",",
"params",
... | Count provides quick access to the document count of the entire cluster,
or individual indices.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html>`_
:arg index: A comma-separated list of index names to limit the returned
information
:arg format... | [
"Count",
"provides",
"quick",
"access",
"to",
"the",
"document",
"count",
"of",
"the",
"entire",
"cluster",
"or",
"individual",
"indices",
".",
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"re... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cat.py#L52-L72 | train |
elastic/elasticsearch-py | elasticsearch/client/cat.py | CatClient.indices | def indices(self, index=None, params=None):
"""
The indices command provides a cross-section of each index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html>`_
:arg index: A comma-separated list of index names to limit the returned
informati... | python | def indices(self, index=None, params=None):
"""
The indices command provides a cross-section of each index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html>`_
:arg index: A comma-separated list of index names to limit the returned
informati... | [
"def",
"indices",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_cat'",
",",
"'indices'",
",",
"index",
")",
",",
"param... | The indices command provides a cross-section of each index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html>`_
:arg index: A comma-separated list of index names to limit the returned
information
:arg bytes: The unit in which to display byte values,... | [
"The",
"indices",
"command",
"provides",
"a",
"cross",
"-",
"section",
"of",
"each",
"index",
".",
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"cat",
"-",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cat.py#L111-L137 | train |
elastic/elasticsearch-py | elasticsearch/client/cat.py | CatClient.recovery | def recovery(self, index=None, params=None):
"""
recovery is a view of shard replication.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html>`_
:arg index: A comma-separated list of index names to limit the returned
information
:arg b... | python | def recovery(self, index=None, params=None):
"""
recovery is a view of shard replication.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html>`_
:arg index: A comma-separated list of index names to limit the returned
information
:arg b... | [
"def",
"recovery",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_cat'",
",",
"'recovery'",
",",
"index",
")",
",",
"par... | recovery is a view of shard replication.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html>`_
:arg index: A comma-separated list of index names to limit the returned
information
:arg bytes: The unit in which to display byte values, valid choices are... | [
"recovery",
"is",
"a",
"view",
"of",
"shard",
"replication",
".",
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"cat",
"-",
"recovery",
".",
"html",
">",
"... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cat.py#L183-L202 | train |
elastic/elasticsearch-py | elasticsearch/client/cat.py | CatClient.shards | def shards(self, index=None, params=None):
"""
The shards command is the detailed view of what nodes contain which shards.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html>`_
:arg index: A comma-separated list of index names to limit the returned
... | python | def shards(self, index=None, params=None):
"""
The shards command is the detailed view of what nodes contain which shards.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html>`_
:arg index: A comma-separated list of index names to limit the returned
... | [
"def",
"shards",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_cat'",
",",
"'shards'",
",",
"index",
")",
",",
"params"... | The shards command is the detailed view of what nodes contain which shards.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html>`_
:arg index: A comma-separated list of index names to limit the returned
information
:arg bytes: The unit in which to displ... | [
"The",
"shards",
"command",
"is",
"the",
"detailed",
"view",
"of",
"what",
"nodes",
"contain",
"which",
"shards",
".",
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cat.py#L205-L226 | train |
elastic/elasticsearch-py | elasticsearch/client/cat.py | CatClient.segments | def segments(self, index=None, params=None):
"""
The segments command is the detailed view of Lucene segments per index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html>`_
:arg index: A comma-separated list of index names to limit the returned
... | python | def segments(self, index=None, params=None):
"""
The segments command is the detailed view of Lucene segments per index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html>`_
:arg index: A comma-separated list of index names to limit the returned
... | [
"def",
"segments",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_cat'",
",",
"'segments'",
",",
"index",
")",
",",
"par... | The segments command is the detailed view of Lucene segments per index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html>`_
:arg index: A comma-separated list of index names to limit the returned
information
:arg bytes: The unit in which to display... | [
"The",
"segments",
"command",
"is",
"the",
"detailed",
"view",
"of",
"Lucene",
"segments",
"per",
"index",
".",
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cat.py#L229-L246 | train |
elastic/elasticsearch-py | elasticsearch/client/cat.py | CatClient.thread_pool | def thread_pool(self, thread_pool_patterns=None, params=None):
"""
Get information about thread pools.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html>`_
:arg thread_pool_patterns: A comma-separated list of regular-expressions
to filter... | python | def thread_pool(self, thread_pool_patterns=None, params=None):
"""
Get information about thread pools.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html>`_
:arg thread_pool_patterns: A comma-separated list of regular-expressions
to filter... | [
"def",
"thread_pool",
"(",
"self",
",",
"thread_pool_patterns",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_cat'",
",",
"'thread_pool'",
",",
"thread_... | Get information about thread pools.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html>`_
:arg thread_pool_patterns: A comma-separated list of regular-expressions
to filter the thread pools in the output
:arg format: a short version of the Accept ... | [
"Get",
"information",
"about",
"thread",
"pools",
".",
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"cat",
"-",
"thread",
"-",
"pool",
".",
"html",
">",
"... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cat.py#L272-L293 | train |
elastic/elasticsearch-py | elasticsearch/client/cat.py | CatClient.fielddata | def fielddata(self, fields=None, params=None):
"""
Shows information about currently loaded fielddata on a per-node basis.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html>`_
:arg fields: A comma-separated list of fields to return the fielddata
... | python | def fielddata(self, fields=None, params=None):
"""
Shows information about currently loaded fielddata on a per-node basis.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html>`_
:arg fields: A comma-separated list of fields to return the fielddata
... | [
"def",
"fielddata",
"(",
"self",
",",
"fields",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_cat'",
",",
"'fielddata'",
",",
"fields",
")",
",",
... | Shows information about currently loaded fielddata on a per-node basis.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html>`_
:arg fields: A comma-separated list of fields to return the fielddata
size
:arg bytes: The unit in which to display byte va... | [
"Shows",
"information",
"about",
"currently",
"loaded",
"fielddata",
"on",
"a",
"per",
"-",
"node",
"basis",
".",
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cat.py#L297-L318 | train |
elastic/elasticsearch-py | elasticsearch/client/cat.py | CatClient.templates | def templates(self, name=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html>`_
:arg name: A pattern that returned template names must match
:arg format: a short version of the Accept header, e.g. json, yaml
:arg h: Comma-... | python | def templates(self, name=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html>`_
:arg name: A pattern that returned template names must match
:arg format: a short version of the Accept header, e.g. json, yaml
:arg h: Comma-... | [
"def",
"templates",
"(",
"self",
",",
"name",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_cat'",
",",
"'templates'",
",",
"name",
")",
",",
"par... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html>`_
:arg name: A pattern that returned template names must match
:arg format: a short version of the Accept header, e.g. json, yaml
:arg h: Comma-separated list of column names to display
:arg help: Retu... | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"cat",
"-",
"templates",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cat.py#L432-L449 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/watcher.py | WatcherClient.ack_watch | def ack_watch(self, watch_id, action_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html>`_
:arg watch_id: Watch ID
:arg action_id: A comma-separated list of the action ids to be acked
"""
if watch_id in ... | python | def ack_watch(self, watch_id, action_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html>`_
:arg watch_id: Watch ID
:arg action_id: A comma-separated list of the action ids to be acked
"""
if watch_id in ... | [
"def",
"ack_watch",
"(",
"self",
",",
"watch_id",
",",
"action_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"watch_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'watch_id'.\"",
")",
"retu... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html>`_
:arg watch_id: Watch ID
:arg action_id: A comma-separated list of the action ids to be acked | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"watcher",
"-",
"api",
"-",
"ack",
"-",
"watch",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/watcher.py#L6-L19 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/watcher.py | WatcherClient.activate_watch | def activate_watch(self, watch_id, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html>`_
:arg watch_id: Watch ID
"""
if watch_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argu... | python | def activate_watch(self, watch_id, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html>`_
:arg watch_id: Watch ID
"""
if watch_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argu... | [
"def",
"activate_watch",
"(",
"self",
",",
"watch_id",
",",
"params",
"=",
"None",
")",
":",
"if",
"watch_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'watch_id'.\"",
")",
"return",
"self",
".",
"transport... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html>`_
:arg watch_id: Watch ID | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"watcher",
"-",
"api",
"-",
"activate",
"-",
"watch",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/watcher.py#L22-L32 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/watcher.py | WatcherClient.delete_watch | def delete_watch(self, id, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html>`_
:arg id: Watch ID
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'id'.")
re... | python | def delete_watch(self, id, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html>`_
:arg id: Watch ID
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'id'.")
re... | [
"def",
"delete_watch",
"(",
"self",
",",
"id",
",",
"params",
"=",
"None",
")",
":",
"if",
"id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'id'.\"",
")",
"return",
"self",
".",
"transport",
".",
"perform... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html>`_
:arg id: Watch ID | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"watcher",
"-",
"api",
"-",
"delete",
"-",
"watch",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/watcher.py#L50-L60 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/watcher.py | WatcherClient.execute_watch | def execute_watch(self, id=None, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html>`_
:arg id: Watch ID
:arg body: Execution control
:arg debug: indicates whether the watch should execute in debug mode
... | python | def execute_watch(self, id=None, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html>`_
:arg id: Watch ID
:arg body: Execution control
:arg debug: indicates whether the watch should execute in debug mode
... | [
"def",
"execute_watch",
"(",
"self",
",",
"id",
"=",
"None",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"PUT\"",
",",
"_make_path",
"(",
"\"_watcher\"",
",",
"\"watch... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html>`_
:arg id: Watch ID
:arg body: Execution control
:arg debug: indicates whether the watch should execute in debug mode | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"watcher",
"-",
"api",
"-",
"execute",
"-",
"watch",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/watcher.py#L63-L76 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/watcher.py | WatcherClient.put_watch | def put_watch(self, id, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html>`_
:arg id: Watch ID
:arg body: The watch
:arg active: Specify whether the watch is in/active by default
:arg if_primary_term:... | python | def put_watch(self, id, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html>`_
:arg id: Watch ID
:arg body: The watch
:arg active: Specify whether the watch is in/active by default
:arg if_primary_term:... | [
"def",
"put_watch",
"(",
"self",
",",
"id",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'id'.\"",
")",
"return",
"self",
".",
... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html>`_
:arg id: Watch ID
:arg body: The watch
:arg active: Specify whether the watch is in/active by default
:arg if_primary_term: only update the watch if the last operation that
has cha... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"watcher",
"-",
"api",
"-",
"put",
"-",
"watch",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/watcher.py#L92-L109 | train |
elastic/elasticsearch-py | elasticsearch/client/cluster.py | ClusterClient.health | def health(self, index=None, params=None):
"""
Get a very simple status on the health of the cluster.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html>`_
:arg index: Limit the information returned to a specific index
:arg level: Specify the le... | python | def health(self, index=None, params=None):
"""
Get a very simple status on the health of the cluster.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html>`_
:arg index: Limit the information returned to a specific index
:arg level: Specify the le... | [
"def",
"health",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_cluster'",
",",
"'health'",
",",
"index",
")",
",",
"par... | Get a very simple status on the health of the cluster.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html>`_
:arg index: Limit the information returned to a specific index
:arg level: Specify the level of detail for returned information,
default 'cl... | [
"Get",
"a",
"very",
"simple",
"status",
"on",
"the",
"health",
"of",
"the",
"cluster",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"cluster",
"-",
"h... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cluster.py#L8-L34 | train |
elastic/elasticsearch-py | elasticsearch/client/cluster.py | ClusterClient.state | def state(self, metric=None, index=None, params=None):
"""
Get a comprehensive state information of the whole cluster.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html>`_
:arg metric: Limit the information returned to the specified metrics
:arg... | python | def state(self, metric=None, index=None, params=None):
"""
Get a comprehensive state information of the whole cluster.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html>`_
:arg metric: Limit the information returned to the specified metrics
:arg... | [
"def",
"state",
"(",
"self",
",",
"metric",
"=",
"None",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"index",
"and",
"not",
"metric",
":",
"metric",
"=",
"'_all'",
"return",
"self",
".",
"transport",
".",
"perform_request",
... | Get a comprehensive state information of the whole cluster.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html>`_
:arg metric: Limit the information returned to the specified metrics
:arg index: A comma-separated list of index names; use `_all` or empty
... | [
"Get",
"a",
"comprehensive",
"state",
"information",
"of",
"the",
"whole",
"cluster",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"cluster",
"-",
"state"... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cluster.py#L53-L77 | train |
elastic/elasticsearch-py | elasticsearch/client/cluster.py | ClusterClient.stats | def stats(self, node_id=None, params=None):
"""
The Cluster Stats API allows to retrieve statistics from a cluster wide
perspective. The API returns basic index metrics and information about
the current nodes that form the cluster.
`<http://www.elastic.co/guide/en/elasticsearch/r... | python | def stats(self, node_id=None, params=None):
"""
The Cluster Stats API allows to retrieve statistics from a cluster wide
perspective. The API returns basic index metrics and information about
the current nodes that form the cluster.
`<http://www.elastic.co/guide/en/elasticsearch/r... | [
"def",
"stats",
"(",
"self",
",",
"node_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"url",
"=",
"'/_cluster/stats'",
"if",
"node_id",
":",
"url",
"=",
"_make_path",
"(",
"'_cluster/stats/nodes'",
",",
"node_id",
")",
"return",
"self",
".",
"t... | The Cluster Stats API allows to retrieve statistics from a cluster wide
perspective. The API returns basic index metrics and information about
the current nodes that form the cluster.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html>`_
:arg node_id: A ... | [
"The",
"Cluster",
"Stats",
"API",
"allows",
"to",
"retrieve",
"statistics",
"from",
"a",
"cluster",
"wide",
"perspective",
".",
"The",
"API",
"returns",
"basic",
"index",
"metrics",
"and",
"information",
"about",
"the",
"current",
"nodes",
"that",
"form",
"the... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cluster.py#L80-L97 | train |
elastic/elasticsearch-py | elasticsearch/client/cluster.py | ClusterClient.reroute | def reroute(self, body=None, params=None):
"""
Explicitly execute a cluster reroute allocation command including specific commands.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html>`_
:arg body: The definition of `commands` to perform (`move`, `cance... | python | def reroute(self, body=None, params=None):
"""
Explicitly execute a cluster reroute allocation command including specific commands.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html>`_
:arg body: The definition of `commands` to perform (`move`, `cance... | [
"def",
"reroute",
"(",
"self",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'POST'",
",",
"'/_cluster/reroute'",
",",
"params",
"=",
"params",
",",
"body",
"=",
"body",
... | Explicitly execute a cluster reroute allocation command including specific commands.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html>`_
:arg body: The definition of `commands` to perform (`move`, `cancel`,
`allocate`)
:arg dry_run: Simulate the ... | [
"Explicitly",
"execute",
"a",
"cluster",
"reroute",
"allocation",
"command",
"including",
"specific",
"commands",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cluster.py#L101-L121 | train |
elastic/elasticsearch-py | elasticsearch/client/cluster.py | ClusterClient.put_settings | def put_settings(self, body=None, params=None):
"""
Update cluster wide specific settings.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html>`_
:arg body: The settings to be updated. Can be either `transient` or
`persistent` (survi... | python | def put_settings(self, body=None, params=None):
"""
Update cluster wide specific settings.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html>`_
:arg body: The settings to be updated. Can be either `transient` or
`persistent` (survi... | [
"def",
"put_settings",
"(",
"self",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'PUT'",
",",
"'/_cluster/settings'",
",",
"params",
"=",
"params",
",",
"body",
"=",
"bo... | Update cluster wide specific settings.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html>`_
:arg body: The settings to be updated. Can be either `transient` or
`persistent` (survives cluster restart).
:arg flat_settings: Return settings in... | [
"Update",
"cluster",
"wide",
"specific",
"settings",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"cluster",
"-",
"update",
"-",
"settings",
".",
"html",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cluster.py#L141-L154 | train |
elastic/elasticsearch-py | elasticsearch/client/cluster.py | ClusterClient.allocation_explain | def allocation_explain(self, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html>`_
:arg body: The index, shard, and primary flag to explain. Empty means
'explain the first unassigned shard'
:arg inclu... | python | def allocation_explain(self, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html>`_
:arg body: The index, shard, and primary flag to explain. Empty means
'explain the first unassigned shard'
:arg inclu... | [
"def",
"allocation_explain",
"(",
"self",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"'/_cluster/allocation/explain'",
",",
"params",
"=",
"params",
",",
"bod... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html>`_
:arg body: The index, shard, and primary flag to explain. Empty means
'explain the first unassigned shard'
:arg include_disk_info: Return information about disk usage and shard
si... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"cluster",
"-",
"allocation",
"-",
"explain",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cluster.py#L157-L169 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/migration.py | MigrationClient.deprecations | def deprecations(self, index=None, params=None):
"""
`<http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html>`_
:arg index: Index pattern
"""
return self.transport.perform_request(
"GET", _make_path(index, "_migration", "deprecations"), para... | python | def deprecations(self, index=None, params=None):
"""
`<http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html>`_
:arg index: Index pattern
"""
return self.transport.perform_request(
"GET", _make_path(index, "_migration", "deprecations"), para... | [
"def",
"deprecations",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"index",
",",
"\"_migration\"",
",",
"\"deprecations\"",
... | `<http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html>`_
:arg index: Index pattern | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"migration",
"/",
"current",
"/",
"migration",
"-",
"api",
"-",
"deprecation",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/migration.py#L6-L14 | train |
elastic/elasticsearch-py | elasticsearch/connection_pool.py | ConnectionPool.get_connection | def get_connection(self):
"""
Return a connection from the pool using the `ConnectionSelector`
instance.
It tries to resurrect eligible connections, forces a resurrection when
no connections are availible and passes the list of live connections to
the selector instance t... | python | def get_connection(self):
"""
Return a connection from the pool using the `ConnectionSelector`
instance.
It tries to resurrect eligible connections, forces a resurrection when
no connections are availible and passes the list of live connections to
the selector instance t... | [
"def",
"get_connection",
"(",
"self",
")",
":",
"self",
".",
"resurrect",
"(",
")",
"connections",
"=",
"self",
".",
"connections",
"[",
":",
"]",
"# no live nodes, resurrect one by force and return it",
"if",
"not",
"connections",
":",
"return",
"self",
".",
"r... | Return a connection from the pool using the `ConnectionSelector`
instance.
It tries to resurrect eligible connections, forces a resurrection when
no connections are availible and passes the list of live connections to
the selector instance to choose from.
Returns a connection i... | [
"Return",
"a",
"connection",
"from",
"the",
"pool",
"using",
"the",
"ConnectionSelector",
"instance",
"."
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/connection_pool.py#L206-L229 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ccr.py | CcrClient.follow | def follow(self, index, body, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html>`_
:arg index: The name of the follower index
:arg body: The name of the leader index and other optional ccr related
parameters
:arg ... | python | def follow(self, index, body, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html>`_
:arg index: The name of the follower index
:arg body: The name of the leader index and other optional ccr related
parameters
:arg ... | [
"def",
"follow",
"(",
"self",
",",
"index",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"index",
",",
"body",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a re... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html>`_
:arg index: The name of the follower index
:arg body: The name of the leader index and other optional ccr related
parameters
:arg wait_for_active_shards: Sets the number of shard copies that mus... | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ccr",
"-",
"put",
"-",
"follow",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L19-L37 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ccr.py | CcrClient.follow_info | def follow_info(self, index=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html>`_
:arg index: A comma-separated list of index patterns; use `_all` to
perform the operation on all indices
"""
return self.... | python | def follow_info(self, index=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html>`_
:arg index: A comma-separated list of index patterns; use `_all` to
perform the operation on all indices
"""
return self.... | [
"def",
"follow_info",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"index",
",",
"\"_ccr\"",
",",
"\"info\"",
")",
",",
... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html>`_
:arg index: A comma-separated list of index patterns; use `_all` to
perform the operation on all indices | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ccr",
"-",
"get",
"-",
"follow",
"-",
"info",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L40-L49 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ccr.py | CcrClient.follow_stats | def follow_stats(self, index, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html>`_
:arg index: A comma-separated list of index patterns; use `_all` to
perform the operation on all indices
"""
if index in SKI... | python | def follow_stats(self, index, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html>`_
:arg index: A comma-separated list of index patterns; use `_all` to
perform the operation on all indices
"""
if index in SKI... | [
"def",
"follow_stats",
"(",
"self",
",",
"index",
",",
"params",
"=",
"None",
")",
":",
"if",
"index",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'index'.\"",
")",
"return",
"self",
".",
"transport",
".",
... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html>`_
:arg index: A comma-separated list of index patterns; use `_all` to
perform the operation on all indices | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ccr",
"-",
"get",
"-",
"follow",
"-",
"stats",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L52-L63 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ccr.py | CcrClient.get_auto_follow_pattern | def get_auto_follow_pattern(self, name=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern.
"""
return self.transport.perform_request(
"GET", _mak... | python | def get_auto_follow_pattern(self, name=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern.
"""
return self.transport.perform_request(
"GET", _mak... | [
"def",
"get_auto_follow_pattern",
"(",
"self",
",",
"name",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"\"_ccr\"",
",",
"\"auto_follow\"",
",",
"name"... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern. | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ccr",
"-",
"get",
"-",
"auto",
"-",
"follow",
"-",
"pattern",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L88-L96 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ccr.py | CcrClient.put_auto_follow_pattern | def put_auto_follow_pattern(self, name, body, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern.
:arg body: The specification of the auto follow pattern
"""
... | python | def put_auto_follow_pattern(self, name, body, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern.
:arg body: The specification of the auto follow pattern
"""
... | [
"def",
"put_auto_follow_pattern",
"(",
"self",
",",
"name",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"name",
",",
"body",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value ... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html>`_
:arg name: The name of the auto follow pattern.
:arg body: The specification of the auto follow pattern | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ccr",
"-",
"put",
"-",
"auto",
"-",
"follow",
"-",
"pattern",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L113-L125 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ccr.py | CcrClient.resume_follow | def resume_follow(self, index, body=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html>`_
:arg index: The name of the follow index to resume following.
:arg body: The name of the leader index and other optional ccr relat... | python | def resume_follow(self, index, body=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html>`_
:arg index: The name of the follow index to resume following.
:arg body: The name of the leader index and other optional ccr relat... | [
"def",
"resume_follow",
"(",
"self",
",",
"index",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"index",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'index'.\"",
")",
"return",
"se... | `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html>`_
:arg index: The name of the follow index to resume following.
:arg body: The name of the leader index and other optional ccr related
parameters | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ccr",
"-",
"post",
"-",
"resume",
"-",
"follow",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L128-L140 | train |
elastic/elasticsearch-py | elasticsearch/client/ingest.py | IngestClient.get_pipeline | def get_pipeline(self, id=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html>`_
:arg id: Comma separated list of pipeline ids. Wildcards supported
:arg master_timeout: Explicit operation timeout for connection to master
node
... | python | def get_pipeline(self, id=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html>`_
:arg id: Comma separated list of pipeline ids. Wildcards supported
:arg master_timeout: Explicit operation timeout for connection to master
node
... | [
"def",
"get_pipeline",
"(",
"self",
",",
"id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_ingest'",
",",
"'pipeline'",
",",
"id",
")",
",",
"pa... | `<https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html>`_
:arg id: Comma separated list of pipeline ids. Wildcards supported
:arg master_timeout: Explicit operation timeout for connection to master
node | [
"<https",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"plugins",
"/",
"current",
"/",
"ingest",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/ingest.py#L5-L14 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.delete_calendar_event | def delete_calendar_event(self, calendar_id, event_id, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar to modify
:arg event_id: The ID of the event to remove from the calendar
"""
for param in (calendar_id, event_id):
if param in SKIP_IN_PATH... | python | def delete_calendar_event(self, calendar_id, event_id, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar to modify
:arg event_id: The ID of the event to remove from the calendar
"""
for param in (calendar_id, event_id):
if param in SKIP_IN_PATH... | [
"def",
"delete_calendar_event",
"(",
"self",
",",
"calendar_id",
",",
"event_id",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"calendar_id",
",",
"event_id",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(... | `<>`_
:arg calendar_id: The ID of the calendar to modify
:arg event_id: The ID of the event to remove from the calendar | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L44-L58 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.delete_filter | def delete_filter(self, filter_id, params=None):
"""
`<>`_
:arg filter_id: The ID of the filter to delete
"""
if filter_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'filter_id'.")
return self.transport.perform_request(
... | python | def delete_filter(self, filter_id, params=None):
"""
`<>`_
:arg filter_id: The ID of the filter to delete
"""
if filter_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'filter_id'.")
return self.transport.perform_request(
... | [
"def",
"delete_filter",
"(",
"self",
",",
"filter_id",
",",
"params",
"=",
"None",
")",
":",
"if",
"filter_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'filter_id'.\"",
")",
"return",
"self",
".",
"transpo... | `<>`_
:arg filter_id: The ID of the filter to delete | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L103-L113 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.delete_forecast | def delete_forecast(self, job_id, forecast_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html>`_
:arg job_id: The ID of the job from which to delete forecasts
:arg forecast_id: The ID of the forecast to delete, can be comm... | python | def delete_forecast(self, job_id, forecast_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html>`_
:arg job_id: The ID of the job from which to delete forecasts
:arg forecast_id: The ID of the forecast to delete, can be comm... | [
"def",
"delete_forecast",
"(",
"self",
",",
"job_id",
",",
"forecast_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"job_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'job_id'.\"",
")",
"re... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html>`_
:arg job_id: The ID of the job from which to delete forecasts
:arg forecast_id: The ID of the forecast to delete, can be comma
delimited list. Leaving blank implies `_all`
:arg allow_no_forec... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"delete",
"-",
"forecast",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L116-L134 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.delete_job | def delete_job(self, job_id, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html>`_
:arg job_id: The ID of the job to delete
:arg force: True if the job should be forcefully deleted, default False
:arg wait_for_completion: Should... | python | def delete_job(self, job_id, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html>`_
:arg job_id: The ID of the job to delete
:arg force: True if the job should be forcefully deleted, default False
:arg wait_for_completion: Should... | [
"def",
"delete_job",
"(",
"self",
",",
"job_id",
",",
"params",
"=",
"None",
")",
":",
"if",
"job_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'job_id'.\"",
")",
"return",
"self",
".",
"transport",
".",
... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html>`_
:arg job_id: The ID of the job to delete
:arg force: True if the job should be forcefully deleted, default False
:arg wait_for_completion: Should this request wait until the operation
has complete... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"delete",
"-",
"job",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L137-L150 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.delete_model_snapshot | def delete_model_snapshot(self, job_id, snapshot_id, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html>`_
:arg job_id: The ID of the job to fetch
:arg snapshot_id: The ID of the snapshot to delete
"""
for param in ... | python | def delete_model_snapshot(self, job_id, snapshot_id, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html>`_
:arg job_id: The ID of the job to fetch
:arg snapshot_id: The ID of the snapshot to delete
"""
for param in ... | [
"def",
"delete_model_snapshot",
"(",
"self",
",",
"job_id",
",",
"snapshot_id",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"job_id",
",",
"snapshot_id",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html>`_
:arg job_id: The ID of the job to fetch
:arg snapshot_id: The ID of the snapshot to delete | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"delete",
"-",
"snapshot",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L153-L169 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.find_file_structure | def find_file_structure(self, body, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-file-structure.html>`_
:arg body: The contents of the file to be analyzed
:arg charset: Optional parameter to specify the character set of the
file
... | python | def find_file_structure(self, body, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-file-structure.html>`_
:arg body: The contents of the file to be analyzed
:arg charset: Optional parameter to specify the character set of the
file
... | [
"def",
"find_file_structure",
"(",
"self",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"if",
"body",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'body'.\"",
")",
"return",
"self",
".",
"transport",
".... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-file-structure.html>`_
:arg body: The contents of the file to be analyzed
:arg charset: Optional parameter to specify the character set of the
file
:arg column_names: Optional parameter containing a comma separated ... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"file",
"-",
"structure",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L186-L228 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.flush_job | def flush_job(self, job_id, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html>`_
:arg job_id: The name of the job to flush
:arg body: Flush parameters
:arg advance_time: Advances time to the given value generating res... | python | def flush_job(self, job_id, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html>`_
:arg job_id: The name of the job to flush
:arg body: Flush parameters
:arg advance_time: Advances time to the given value generating res... | [
"def",
"flush_job",
"(",
"self",
",",
"job_id",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"job_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'job_id'.\"",
")",
"return",
"sel... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html>`_
:arg job_id: The name of the job to flush
:arg body: Flush parameters
:arg advance_time: Advances time to the given value generating results
and updating the model for the advanced interval
... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"flush",
"-",
"job",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L231-L255 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.get_buckets | def get_buckets(self, job_id, timestamp=None, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html>`_
:arg job_id: ID of the job to get bucket results from
:arg timestamp: The timestamp of the desired single bucket result
... | python | def get_buckets(self, job_id, timestamp=None, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html>`_
:arg job_id: ID of the job to get bucket results from
:arg timestamp: The timestamp of the desired single bucket result
... | [
"def",
"get_buckets",
"(",
"self",
",",
"job_id",
",",
"timestamp",
"=",
"None",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"job_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argumen... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html>`_
:arg job_id: ID of the job to get bucket results from
:arg timestamp: The timestamp of the desired single bucket result
:arg body: Bucket selection details if not provided in URI
:arg anomaly_score: F... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"get",
"-",
"bucket",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L286-L312 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.get_calendar_events | def get_calendar_events(self, calendar_id, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar containing the events
:arg end: Get events before this time
:arg from_: Skips a number of events
:arg job_id: Get events for the job. When this option is used
... | python | def get_calendar_events(self, calendar_id, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar containing the events
:arg end: Get events before this time
:arg from_: Skips a number of events
:arg job_id: Get events for the job. When this option is used
... | [
"def",
"get_calendar_events",
"(",
"self",
",",
"calendar_id",
",",
"params",
"=",
"None",
")",
":",
"if",
"calendar_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'calendar_id'.\"",
")",
"return",
"self",
"."... | `<>`_
:arg calendar_id: The ID of the calendar containing the events
:arg end: Get events before this time
:arg from_: Skips a number of events
:arg job_id: Get events for the job. When this option is used
calendar_id must be '_all'
:arg size: Specifies a max number ... | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L315-L333 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.get_calendars | def get_calendars(self, calendar_id=None, body=None, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar to fetch
:arg body: The from and size parameters optionally sent in the body
:arg from_: skips a number of calendars
:arg size: specifies a max number of... | python | def get_calendars(self, calendar_id=None, body=None, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar to fetch
:arg body: The from and size parameters optionally sent in the body
:arg from_: skips a number of calendars
:arg size: specifies a max number of... | [
"def",
"get_calendars",
"(",
"self",
",",
"calendar_id",
"=",
"None",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"\"_ml\"",
",",
"\"c... | `<>`_
:arg calendar_id: The ID of the calendar to fetch
:arg body: The from and size parameters optionally sent in the body
:arg from_: skips a number of calendars
:arg size: specifies a max number of calendars to get | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L336-L347 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.get_categories | def get_categories(self, job_id, category_id=None, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html>`_
:arg job_id: The name of the job
:arg category_id: The identifier of the category definition of interest
:arg ... | python | def get_categories(self, job_id, category_id=None, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html>`_
:arg job_id: The name of the job
:arg category_id: The identifier of the category definition of interest
:arg ... | [
"def",
"get_categories",
"(",
"self",
",",
"job_id",
",",
"category_id",
"=",
"None",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"job_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required ar... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html>`_
:arg job_id: The name of the job
:arg category_id: The identifier of the category definition of interest
:arg body: Category selection details if not provided in URI
:arg from_: skips a number of ca... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"get",
"-",
"category",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L350-L369 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.get_datafeed_stats | def get_datafeed_stats(self, datafeed_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html>`_
:arg datafeed_id: The ID of the datafeeds stats to fetch
:arg allow_no_datafeeds: Whether to ignore if a wildcard expression
... | python | def get_datafeed_stats(self, datafeed_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html>`_
:arg datafeed_id: The ID of the datafeeds stats to fetch
:arg allow_no_datafeeds: Whether to ignore if a wildcard expression
... | [
"def",
"get_datafeed_stats",
"(",
"self",
",",
"datafeed_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"\"_ml\"",
",",
"\"datafeeds\"",
",",
"datafe... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html>`_
:arg datafeed_id: The ID of the datafeeds stats to fetch
:arg allow_no_datafeeds: Whether to ignore if a wildcard expression
matches no datafeeds. (This includes `_all` string or when no
... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"get",
"-",
"datafeed",
"-",
"stats",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L372-L383 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.get_datafeeds | def get_datafeeds(self, datafeed_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html>`_
:arg datafeed_id: The ID of the datafeeds to fetch
:arg allow_no_datafeeds: Whether to ignore if a wildcard expression
matches... | python | def get_datafeeds(self, datafeed_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html>`_
:arg datafeed_id: The ID of the datafeeds to fetch
:arg allow_no_datafeeds: Whether to ignore if a wildcard expression
matches... | [
"def",
"get_datafeeds",
"(",
"self",
",",
"datafeed_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"\"_ml\"",
",",
"\"datafeeds\"",
",",
"datafeed_id... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html>`_
:arg datafeed_id: The ID of the datafeeds to fetch
:arg allow_no_datafeeds: Whether to ignore if a wildcard expression
matches no datafeeds. (This includes `_all` string or when no
datafeeds... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"get",
"-",
"datafeed",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L386-L397 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.get_filters | def get_filters(self, filter_id=None, params=None):
"""
`<>`_
:arg filter_id: The ID of the filter to fetch
:arg from_: skips a number of filters
:arg size: specifies a max number of filters to get
"""
return self.transport.perform_request(
"GET", _ma... | python | def get_filters(self, filter_id=None, params=None):
"""
`<>`_
:arg filter_id: The ID of the filter to fetch
:arg from_: skips a number of filters
:arg size: specifies a max number of filters to get
"""
return self.transport.perform_request(
"GET", _ma... | [
"def",
"get_filters",
"(",
"self",
",",
"filter_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"\"_ml\"",
",",
"\"filters\"",
",",
"filter_id",
")"... | `<>`_
:arg filter_id: The ID of the filter to fetch
:arg from_: skips a number of filters
:arg size: specifies a max number of filters to get | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L400-L410 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.get_job_stats | def get_job_stats(self, job_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html>`_
:arg job_id: The ID of the jobs stats to fetch
:arg allow_no_jobs: Whether to ignore if a wildcard expression matches
no jobs. (Th... | python | def get_job_stats(self, job_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html>`_
:arg job_id: The ID of the jobs stats to fetch
:arg allow_no_jobs: Whether to ignore if a wildcard expression matches
no jobs. (Th... | [
"def",
"get_job_stats",
"(",
"self",
",",
"job_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"\"_ml\"",
",",
"\"anomaly_detectors\"",
",",
"job_id",... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html>`_
:arg job_id: The ID of the jobs stats to fetch
:arg allow_no_jobs: Whether to ignore if a wildcard expression matches
no jobs. (This includes `_all` string or when no jobs have been
specifi... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"get",
"-",
"job",
"-",
"stats",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L448-L461 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.get_jobs | def get_jobs(self, job_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html>`_
:arg job_id: The ID of the jobs to fetch
:arg allow_no_jobs: Whether to ignore if a wildcard expression matches
no jobs. (This includes `_all... | python | def get_jobs(self, job_id=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html>`_
:arg job_id: The ID of the jobs to fetch
:arg allow_no_jobs: Whether to ignore if a wildcard expression matches
no jobs. (This includes `_all... | [
"def",
"get_jobs",
"(",
"self",
",",
"job_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"\"_ml\"",
",",
"\"anomaly_detectors\"",
",",
"job_id",
")... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html>`_
:arg job_id: The ID of the jobs to fetch
:arg allow_no_jobs: Whether to ignore if a wildcard expression matches
no jobs. (This includes `_all` string or when no jobs have been
specified) | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"get",
"-",
"job",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L464-L475 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.get_model_snapshots | def get_model_snapshots(self, job_id, snapshot_id=None, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html>`_
:arg job_id: The ID of the job to fetch
:arg snapshot_id: The ID of the snapshot to fetch
:arg body: Mode... | python | def get_model_snapshots(self, job_id, snapshot_id=None, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html>`_
:arg job_id: The ID of the job to fetch
:arg snapshot_id: The ID of the snapshot to fetch
:arg body: Mode... | [
"def",
"get_model_snapshots",
"(",
"self",
",",
"job_id",
",",
"snapshot_id",
"=",
"None",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"job_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a requir... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html>`_
:arg job_id: The ID of the job to fetch
:arg snapshot_id: The ID of the snapshot to fetch
:arg body: Model snapshot selection criteria
:arg desc: True if the results should be sorted in descending o... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"get",
"-",
"snapshot",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L478-L502 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.post_calendar_events | def post_calendar_events(self, calendar_id, body, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar to modify
:arg body: A list of events
"""
for param in (calendar_id, body):
if param in SKIP_IN_PATH:
raise ValueError("Empty va... | python | def post_calendar_events(self, calendar_id, body, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar to modify
:arg body: A list of events
"""
for param in (calendar_id, body):
if param in SKIP_IN_PATH:
raise ValueError("Empty va... | [
"def",
"post_calendar_events",
"(",
"self",
",",
"calendar_id",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"calendar_id",
",",
"body",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"E... | `<>`_
:arg calendar_id: The ID of the calendar to modify
:arg body: A list of events | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L601-L616 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.post_data | def post_data(self, job_id, body, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html>`_
:arg job_id: The name of the job receiving the data
:arg body: The data to process
:arg reset_end: Optional parameter to specify the end of t... | python | def post_data(self, job_id, body, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html>`_
:arg job_id: The name of the job receiving the data
:arg body: The data to process
:arg reset_end: Optional parameter to specify the end of t... | [
"def",
"post_data",
"(",
"self",
",",
"job_id",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"job_id",
",",
"body",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html>`_
:arg job_id: The name of the job receiving the data
:arg body: The data to process
:arg reset_end: Optional parameter to specify the end of the bucket
resetting range
:arg reset_start: Opti... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"post",
"-",
"data",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L619-L638 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.preview_datafeed | def preview_datafeed(self, datafeed_id, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to preview
"""
if datafeed_id in SKIP_IN_PATH:
raise ValueError(
... | python | def preview_datafeed(self, datafeed_id, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to preview
"""
if datafeed_id in SKIP_IN_PATH:
raise ValueError(
... | [
"def",
"preview_datafeed",
"(",
"self",
",",
"datafeed_id",
",",
"params",
"=",
"None",
")",
":",
"if",
"datafeed_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'datafeed_id'.\"",
")",
"return",
"self",
".",
... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to preview | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"preview",
"-",
"datafeed",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L641-L655 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.put_calendar | def put_calendar(self, calendar_id, body=None, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar to create
:arg body: The calendar details
"""
if calendar_id in SKIP_IN_PATH:
raise ValueError(
"Empty value passed for a required ... | python | def put_calendar(self, calendar_id, body=None, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar to create
:arg body: The calendar details
"""
if calendar_id in SKIP_IN_PATH:
raise ValueError(
"Empty value passed for a required ... | [
"def",
"put_calendar",
"(",
"self",
",",
"calendar_id",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"calendar_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'calendar_id'.\"",
")",
... | `<>`_
:arg calendar_id: The ID of the calendar to create
:arg body: The calendar details | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L658-L671 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.put_calendar_job | def put_calendar_job(self, calendar_id, job_id, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar to modify
:arg job_id: The ID of the job to add to the calendar
"""
for param in (calendar_id, job_id):
if param in SKIP_IN_PATH:
... | python | def put_calendar_job(self, calendar_id, job_id, params=None):
"""
`<>`_
:arg calendar_id: The ID of the calendar to modify
:arg job_id: The ID of the job to add to the calendar
"""
for param in (calendar_id, job_id):
if param in SKIP_IN_PATH:
... | [
"def",
"put_calendar_job",
"(",
"self",
",",
"calendar_id",
",",
"job_id",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"calendar_id",
",",
"job_id",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"E... | `<>`_
:arg calendar_id: The ID of the calendar to modify
:arg job_id: The ID of the job to add to the calendar | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L674-L688 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.start_datafeed | def start_datafeed(self, datafeed_id, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to start
:arg body: The start datafeed parameters
:arg end: The end time when th... | python | def start_datafeed(self, datafeed_id, body=None, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to start
:arg body: The start datafeed parameters
:arg end: The end time when th... | [
"def",
"start_datafeed",
"(",
"self",
",",
"datafeed_id",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"datafeed_id",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'datafeed_id'.\"",
")"... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to start
:arg body: The start datafeed parameters
:arg end: The end time when the datafeed should stop. When not set, the
datafeed continues in real ti... | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"start",
"-",
"datafeed",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L781-L802 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.update_datafeed | def update_datafeed(self, datafeed_id, body, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to update
:arg body: The datafeed update settings
"""
for param in (datafee... | python | def update_datafeed(self, datafeed_id, body, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to update
:arg body: The datafeed update settings
"""
for param in (datafee... | [
"def",
"update_datafeed",
"(",
"self",
",",
"datafeed_id",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"datafeed_id",
",",
"body",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty ... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html>`_
:arg datafeed_id: The ID of the datafeed to update
:arg body: The datafeed update settings | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"update",
"-",
"datafeed",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L826-L841 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.update_filter | def update_filter(self, filter_id, body, params=None):
"""
`<>`_
:arg filter_id: The ID of the filter to update
:arg body: The filter update
"""
for param in (filter_id, body):
if param in SKIP_IN_PATH:
raise ValueError("Empty value passed for... | python | def update_filter(self, filter_id, body, params=None):
"""
`<>`_
:arg filter_id: The ID of the filter to update
:arg body: The filter update
"""
for param in (filter_id, body):
if param in SKIP_IN_PATH:
raise ValueError("Empty value passed for... | [
"def",
"update_filter",
"(",
"self",
",",
"filter_id",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"filter_id",
",",
"body",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value ... | `<>`_
:arg filter_id: The ID of the filter to update
:arg body: The filter update | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L844-L859 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.update_model_snapshot | def update_model_snapshot(self, job_id, snapshot_id, body, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html>`_
:arg job_id: The ID of the job to fetch
:arg snapshot_id: The ID of the snapshot to update
:arg body: The mode... | python | def update_model_snapshot(self, job_id, snapshot_id, body, params=None):
"""
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html>`_
:arg job_id: The ID of the job to fetch
:arg snapshot_id: The ID of the snapshot to update
:arg body: The mode... | [
"def",
"update_model_snapshot",
"(",
"self",
",",
"job_id",
",",
"snapshot_id",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"job_id",
",",
"snapshot_id",
",",
"body",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
... | `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html>`_
:arg job_id: The ID of the job to fetch
:arg snapshot_id: The ID of the snapshot to update
:arg body: The model snapshot properties to update | [
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"ml",
"-",
"update",
"-",
"snapshot",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L880-L903 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.validate | def validate(self, body, params=None):
"""
`<>`_
:arg body: The job config
"""
if body in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'body'.")
return self.transport.perform_request(
"POST", "/_ml/anomaly_detectors/_... | python | def validate(self, body, params=None):
"""
`<>`_
:arg body: The job config
"""
if body in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'body'.")
return self.transport.perform_request(
"POST", "/_ml/anomaly_detectors/_... | [
"def",
"validate",
"(",
"self",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"if",
"body",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'body'.\"",
")",
"return",
"self",
".",
"transport",
".",
"perfo... | `<>`_
:arg body: The job config | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L906-L916 | train |
elastic/elasticsearch-py | elasticsearch/client/xpack/ml.py | MlClient.validate_detector | def validate_detector(self, body, params=None):
"""
`<>`_
:arg body: The detector
"""
if body in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'body'.")
return self.transport.perform_request(
"POST",
"/_ml/... | python | def validate_detector(self, body, params=None):
"""
`<>`_
:arg body: The detector
"""
if body in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'body'.")
return self.transport.perform_request(
"POST",
"/_ml/... | [
"def",
"validate_detector",
"(",
"self",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"if",
"body",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'body'.\"",
")",
"return",
"self",
".",
"transport",
".",... | `<>`_
:arg body: The detector | [
"<",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L919-L932 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.analyze | def analyze(self, index=None, body=None, params=None):
"""
Perform the analysis process on a text and return the tokens breakdown of the text.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html>`_
:arg index: The name of the index to scope the operatio... | python | def analyze(self, index=None, body=None, params=None):
"""
Perform the analysis process on a text and return the tokens breakdown of the text.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html>`_
:arg index: The name of the index to scope the operatio... | [
"def",
"analyze",
"(",
"self",
",",
"index",
"=",
"None",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"index",
",",
"\"_analyze\"",
... | Perform the analysis process on a text and return the tokens breakdown of the text.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html>`_
:arg index: The name of the index to scope the operation
:arg body: Define analyzer/tokenizer parameters and the text on w... | [
"Perform",
"the",
"analysis",
"process",
"on",
"a",
"text",
"and",
"return",
"the",
"tokens",
"breakdown",
"of",
"the",
"text",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L6-L21 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.refresh | def refresh(self, index=None, params=None):
"""
Explicitly refresh one or more index, making all operations performed
since the last refresh available for search.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html>`_
:arg index: A comma-separat... | python | def refresh(self, index=None, params=None):
"""
Explicitly refresh one or more index, making all operations performed
since the last refresh available for search.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html>`_
:arg index: A comma-separat... | [
"def",
"refresh",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"POST\"",
",",
"_make_path",
"(",
"index",
",",
"\"_refresh\"",
")",
",",
"params",
"=",
... | Explicitly refresh one or more index, making all operations performed
since the last refresh available for search.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string t... | [
"Explicitly",
"refresh",
"one",
"or",
"more",
"index",
"making",
"all",
"operations",
"performed",
"since",
"the",
"last",
"refresh",
"available",
"for",
"search",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L24-L43 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.flush | def flush(self, index=None, params=None):
"""
Explicitly flush one or more indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string for all indices
:a... | python | def flush(self, index=None, params=None):
"""
Explicitly flush one or more indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string for all indices
:a... | [
"def",
"flush",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"POST\"",
",",
"_make_path",
"(",
"index",
",",
"\"_flush\"",
")",
",",
"params",
"=",
"par... | Explicitly flush one or more indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string for all indices
:arg allow_no_indices: Whether to ignore if a wildcard indices
... | [
"Explicitly",
"flush",
"one",
"or",
"more",
"indices",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"flush",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L52-L79 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.get | def get(self, index, feature=None, params=None):
"""
The get index API allows to retrieve information about one or more indexes.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html>`_
:arg index: A comma-separated list of index names
:arg allo... | python | def get(self, index, feature=None, params=None):
"""
The get index API allows to retrieve information about one or more indexes.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html>`_
:arg index: A comma-separated list of index names
:arg allo... | [
"def",
"get",
"(",
"self",
",",
"index",
",",
"feature",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"index",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'index'.\"",
")",
"return",
"self",
... | The get index API allows to retrieve information about one or more indexes.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html>`_
:arg index: A comma-separated list of index names
:arg allow_no_indices: Ignore if a wildcard expression resolves to no
... | [
"The",
"get",
"index",
"API",
"allows",
"to",
"retrieve",
"information",
"about",
"one",
"or",
"more",
"indexes",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L113-L137 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.exists_type | def exists_type(self, index, doc_type, params=None):
"""
Check if a type/types exists in an index/indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-types-exists.html>`_
:arg index: A comma-separated list of index names; use `_all` to check
the... | python | def exists_type(self, index, doc_type, params=None):
"""
Check if a type/types exists in an index/indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-types-exists.html>`_
:arg index: A comma-separated list of index names; use `_all` to check
the... | [
"def",
"exists_type",
"(",
"self",
",",
"index",
",",
"doc_type",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"index",
",",
"doc_type",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value pa... | Check if a type/types exists in an index/indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-types-exists.html>`_
:arg index: A comma-separated list of index names; use `_all` to check
the types across all indices
:arg doc_type: A comma-separated list o... | [
"Check",
"if",
"a",
"type",
"/",
"types",
"exists",
"in",
"an",
"index",
"/",
"indices",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L260-L284 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.get_mapping | def get_mapping(self, index=None, doc_type=None, params=None):
"""
Retrieve mapping definition of index or index/type.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html>`_
:arg index: A comma-separated list of index names
:arg doc_type: A ... | python | def get_mapping(self, index=None, doc_type=None, params=None):
"""
Retrieve mapping definition of index or index/type.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html>`_
:arg index: A comma-separated list of index names
:arg doc_type: A ... | [
"def",
"get_mapping",
"(",
"self",
",",
"index",
"=",
"None",
",",
"doc_type",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"index",
",",
"\"_mappin... | Retrieve mapping definition of index or index/type.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html>`_
:arg index: A comma-separated list of index names
:arg doc_type: A comma-separated list of document types
:arg allow_no_indices: Whether to ig... | [
"Retrieve",
"mapping",
"definition",
"of",
"index",
"or",
"index",
"/",
"type",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"get",
"-",... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L331-L353 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.get_field_mapping | def get_field_mapping(self, fields, index=None, doc_type=None, params=None):
"""
Retrieve mapping definition of a specific field.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html>`_
:arg fields: A comma-separated list of fields
:arg... | python | def get_field_mapping(self, fields, index=None, doc_type=None, params=None):
"""
Retrieve mapping definition of a specific field.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html>`_
:arg fields: A comma-separated list of fields
:arg... | [
"def",
"get_field_mapping",
"(",
"self",
",",
"fields",
",",
"index",
"=",
"None",
",",
"doc_type",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"fields",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required a... | Retrieve mapping definition of a specific field.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html>`_
:arg fields: A comma-separated list of fields
:arg index: A comma-separated list of index names
:arg doc_type: A comma-separated list of do... | [
"Retrieve",
"mapping",
"definition",
"of",
"a",
"specific",
"field",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"get",
"-",
"field",
"... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L363-L392 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.put_alias | def put_alias(self, index, name, body=None, params=None):
"""
Create an alias for a specific index/indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names the alias should point
to (s... | python | def put_alias(self, index, name, body=None, params=None):
"""
Create an alias for a specific index/indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names the alias should point
to (s... | [
"def",
"put_alias",
"(",
"self",
",",
"index",
",",
"name",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"index",
",",
"name",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
... | Create an alias for a specific index/indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names the alias should point
to (supports wildcards); use `_all` to perform the operation on all
ind... | [
"Create",
"an",
"alias",
"for",
"a",
"specific",
"index",
"/",
"indices",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"aliases",
".",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L395-L413 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.exists_alias | def exists_alias(self, index=None, name=None, params=None):
"""
Return a boolean indicating whether given alias exists.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names to filter aliases
:a... | python | def exists_alias(self, index=None, name=None, params=None):
"""
Return a boolean indicating whether given alias exists.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names to filter aliases
:a... | [
"def",
"exists_alias",
"(",
"self",
",",
"index",
"=",
"None",
",",
"name",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"HEAD\"",
",",
"_make_path",
"(",
"index",
",",
"\"_alias\""... | Return a boolean indicating whether given alias exists.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names to filter aliases
:arg name: A comma-separated list of alias names to return
:arg allow_no_i... | [
"Return",
"a",
"boolean",
"indicating",
"whether",
"given",
"alias",
"exists",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"aliases",
"."... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L416-L436 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.get_alias | def get_alias(self, index=None, name=None, params=None):
"""
Retrieve a specified alias.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names to filter aliases
:arg name: A comma-separated list... | python | def get_alias(self, index=None, name=None, params=None):
"""
Retrieve a specified alias.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names to filter aliases
:arg name: A comma-separated list... | [
"def",
"get_alias",
"(",
"self",
",",
"index",
"=",
"None",
",",
"name",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"index",
",",
"\"_alias\"",
... | Retrieve a specified alias.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names to filter aliases
:arg name: A comma-separated list of alias names to return
:arg allow_no_indices: Whether to ignore if... | [
"Retrieve",
"a",
"specified",
"alias",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"aliases",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L439-L459 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.update_aliases | def update_aliases(self, body, params=None):
"""
Update specified aliases.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg body: The definition of `actions` to perform
:arg master_timeout: Specify timeout for connection to master
... | python | def update_aliases(self, body, params=None):
"""
Update specified aliases.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg body: The definition of `actions` to perform
:arg master_timeout: Specify timeout for connection to master
... | [
"def",
"update_aliases",
"(",
"self",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"if",
"body",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'body'.\"",
")",
"return",
"self",
".",
"transport",
".",
... | Update specified aliases.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg body: The definition of `actions` to perform
:arg master_timeout: Specify timeout for connection to master
:arg request_timeout: Request timeout | [
"Update",
"specified",
"aliases",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"aliases",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L462-L475 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.delete_alias | def delete_alias(self, index, name, params=None):
"""
Delete specific alias.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names (supports wildcards);
use `_all` for all indices
:a... | python | def delete_alias(self, index, name, params=None):
"""
Delete specific alias.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names (supports wildcards);
use `_all` for all indices
:a... | [
"def",
"delete_alias",
"(",
"self",
",",
"index",
",",
"name",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"index",
",",
"name",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed fo... | Delete specific alias.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_
:arg index: A comma-separated list of index names (supports wildcards);
use `_all` for all indices
:arg name: A comma-separated list of aliases to delete (supports
... | [
"Delete",
"specific",
"alias",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"aliases",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L478-L496 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.get_template | def get_template(self, name=None, params=None):
"""
Retrieve an index template by its name.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>`_
:arg name: The name of the template
:arg flat_settings: Return settings in flat format (default:... | python | def get_template(self, name=None, params=None):
"""
Retrieve an index template by its name.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>`_
:arg name: The name of the template
:arg flat_settings: Return settings in flat format (default:... | [
"def",
"get_template",
"(",
"self",
",",
"name",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"\"_template\"",
",",
"name",
")",
",",
"params",
"=",... | Retrieve an index template by its name.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>`_
:arg name: The name of the template
:arg flat_settings: Return settings in flat format (default: false)
:arg local: Return local information, do not retriev... | [
"Retrieve",
"an",
"index",
"template",
"by",
"its",
"name",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"templates",
".",
"html",
">",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L551-L567 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.get_settings | def get_settings(self, index=None, name=None, params=None):
"""
Retrieve settings for one or more (or all) indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
... | python | def get_settings(self, index=None, name=None, params=None):
"""
Retrieve settings for one or more (or all) indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
... | [
"def",
"get_settings",
"(",
"self",
",",
"index",
"=",
"None",
",",
"name",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"index",
",",
"\"_settings\... | Retrieve settings for one or more (or all) indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string to perform the operation on all indices
:arg name: The name... | [
"Retrieve",
"settings",
"for",
"one",
"or",
"more",
"(",
"or",
"all",
")",
"indices",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"ge... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L593-L617 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.stats | def stats(self, index=None, metric=None, params=None):
"""
Retrieve statistics on different operations happening on an index.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
... | python | def stats(self, index=None, metric=None, params=None):
"""
Retrieve statistics on different operations happening on an index.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
... | [
"def",
"stats",
"(",
"self",
",",
"index",
"=",
"None",
",",
"metric",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"index",
",",
"\"_stats\"",
",... | Retrieve statistics on different operations happening on an index.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string to perform the operation on all indices
:arg metric... | [
"Retrieve",
"statistics",
"on",
"different",
"operations",
"happening",
"on",
"an",
"index",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L664-L690 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.clear_cache | def clear_cache(self, index=None, params=None):
"""
Clear either all caches or specific cached associated with one ore more indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html>`_
:arg index: A comma-separated list of index name to limit the ... | python | def clear_cache(self, index=None, params=None):
"""
Clear either all caches or specific cached associated with one ore more indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html>`_
:arg index: A comma-separated list of index name to limit the ... | [
"def",
"clear_cache",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"POST\"",
",",
"_make_path",
"(",
"index",
",",
"\"_cache\"",
",",
"\"clear\"",
")",
",... | Clear either all caches or specific cached associated with one ore more indices.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html>`_
:arg index: A comma-separated list of index name to limit the operation
:arg allow_no_indices: Whether to ignore if a wild... | [
"Clear",
"either",
"all",
"caches",
"or",
"specific",
"cached",
"associated",
"with",
"one",
"ore",
"more",
"indices",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"curre... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L790-L815 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.upgrade | def upgrade(self, index=None, params=None):
"""
Upgrade one or more indices to the latest format through an API.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
st... | python | def upgrade(self, index=None, params=None):
"""
Upgrade one or more indices to the latest format through an API.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
st... | [
"def",
"upgrade",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"POST\"",
",",
"_make_path",
"(",
"index",
",",
"\"_upgrade\"",
")",
",",
"params",
"=",
... | Upgrade one or more indices to the latest format through an API.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string to perform the operation on all indices
:arg allow_... | [
"Upgrade",
"one",
"or",
"more",
"indices",
"to",
"the",
"latest",
"format",
"through",
"an",
"API",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indice... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L843-L865 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.get_upgrade | def get_upgrade(self, index=None, params=None):
"""
Monitor how much of one or more index is upgraded.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string to pe... | python | def get_upgrade(self, index=None, params=None):
"""
Monitor how much of one or more index is upgraded.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string to pe... | [
"def",
"get_upgrade",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"index",
",",
"\"_upgrade\"",
")",
",",
"params",
"=",... | Monitor how much of one or more index is upgraded.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string to perform the operation on all indices
:arg allow_no_indices: Wh... | [
"Monitor",
"how",
"much",
"of",
"one",
"or",
"more",
"index",
"is",
"upgraded",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"indices",
"-",
"upgrade",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L868-L886 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.flush_synced | def flush_synced(self, index=None, params=None):
"""
Perform a normal flush, then add a generated unique marker (sync_id) to all shards.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html>`_
:arg index: A comma-separated list of index names; use `... | python | def flush_synced(self, index=None, params=None):
"""
Perform a normal flush, then add a generated unique marker (sync_id) to all shards.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html>`_
:arg index: A comma-separated list of index names; use `... | [
"def",
"flush_synced",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"POST\"",
",",
"_make_path",
"(",
"index",
",",
"\"_flush\"",
",",
"\"synced\"",
")",
... | Perform a normal flush, then add a generated unique marker (sync_id) to all shards.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html>`_
:arg index: A comma-separated list of index names; use `_all` or empty
string for all indices
:arg allow_... | [
"Perform",
"a",
"normal",
"flush",
"then",
"add",
"a",
"generated",
"unique",
"marker",
"(",
"sync_id",
")",
"to",
"all",
"shards",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"referenc... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L889-L907 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.shard_stores | def shard_stores(self, index=None, params=None):
"""
Provides store information for shard copies of indices. Store
information reports on which nodes shard copies exist, the shard copy
version, indicating how recent they are, and any exceptions encountered
while opening the shard... | python | def shard_stores(self, index=None, params=None):
"""
Provides store information for shard copies of indices. Store
information reports on which nodes shard copies exist, the shard copy
version, indicating how recent they are, and any exceptions encountered
while opening the shard... | [
"def",
"shard_stores",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"GET\"",
",",
"_make_path",
"(",
"index",
",",
"\"_shard_stores\"",
")",
",",
"params",
... | Provides store information for shard copies of indices. Store
information reports on which nodes shard copies exist, the shard copy
version, indicating how recent they are, and any exceptions encountered
while opening the shard index or from earlier engine failure.
`<http://www.elastic.c... | [
"Provides",
"store",
"information",
"for",
"shard",
"copies",
"of",
"indices",
".",
"Store",
"information",
"reports",
"on",
"which",
"nodes",
"shard",
"copies",
"exist",
"the",
"shard",
"copy",
"version",
"indicating",
"how",
"recent",
"they",
"are",
"and",
"... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L916-L941 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.forcemerge | def forcemerge(self, index=None, params=None):
"""
The force merge API allows to force merging of one or more indices
through an API. The merge relates to the number of segments a Lucene
index holds within each shard. The force merge operation allows to
reduce the number of segme... | python | def forcemerge(self, index=None, params=None):
"""
The force merge API allows to force merging of one or more indices
through an API. The merge relates to the number of segments a Lucene
index holds within each shard. The force merge operation allows to
reduce the number of segme... | [
"def",
"forcemerge",
"(",
"self",
",",
"index",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"\"POST\"",
",",
"_make_path",
"(",
"index",
",",
"\"_forcemerge\"",
")",
",",
"params",
"... | The force merge API allows to force merging of one or more indices
through an API. The merge relates to the number of segments a Lucene
index holds within each shard. The force merge operation allows to
reduce the number of segments by merging them.
This call will block until the merge ... | [
"The",
"force",
"merge",
"API",
"allows",
"to",
"force",
"merging",
"of",
"one",
"or",
"more",
"indices",
"through",
"an",
"API",
".",
"The",
"merge",
"relates",
"to",
"the",
"number",
"of",
"segments",
"a",
"Lucene",
"index",
"holds",
"within",
"each",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L953-L985 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.shrink | def shrink(self, index, target, body=None, params=None):
"""
The shrink index API allows you to shrink an existing index into a new
index with fewer primary shards. The number of primary shards in the
target index must be a factor of the shards in the source index. For
example an... | python | def shrink(self, index, target, body=None, params=None):
"""
The shrink index API allows you to shrink an existing index into a new
index with fewer primary shards. The number of primary shards in the
target index must be a factor of the shards in the source index. For
example an... | [
"def",
"shrink",
"(",
"self",
",",
"index",
",",
"target",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"index",
",",
"target",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
... | The shrink index API allows you to shrink an existing index into a new
index with fewer primary shards. The number of primary shards in the
target index must be a factor of the shards in the source index. For
example an index with 8 primary shards can be shrunk into 4, 2 or 1
primary sha... | [
"The",
"shrink",
"index",
"API",
"allows",
"you",
"to",
"shrink",
"an",
"existing",
"index",
"into",
"a",
"new",
"index",
"with",
"fewer",
"primary",
"shards",
".",
"The",
"number",
"of",
"primary",
"shards",
"in",
"the",
"target",
"index",
"must",
"be",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L988-L1015 | train |
elastic/elasticsearch-py | elasticsearch/client/indices.py | IndicesClient.rollover | def rollover(self, alias, new_index=None, body=None, params=None):
"""
The rollover index API rolls an alias over to a new index when the
existing index is considered to be too large or too old.
The API accepts a single alias name and a list of conditions. The alias
must point t... | python | def rollover(self, alias, new_index=None, body=None, params=None):
"""
The rollover index API rolls an alias over to a new index when the
existing index is considered to be too large or too old.
The API accepts a single alias name and a list of conditions. The alias
must point t... | [
"def",
"rollover",
"(",
"self",
",",
"alias",
",",
"new_index",
"=",
"None",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"if",
"alias",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'al... | The rollover index API rolls an alias over to a new index when the
existing index is considered to be too large or too old.
The API accepts a single alias name and a list of conditions. The alias
must point to a single index only. If the index satisfies the specified
conditions then a n... | [
"The",
"rollover",
"index",
"API",
"rolls",
"an",
"alias",
"over",
"to",
"a",
"new",
"index",
"when",
"the",
"existing",
"index",
"is",
"considered",
"to",
"be",
"too",
"large",
"or",
"too",
"old",
"."
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L1024-L1052 | train |
elastic/elasticsearch-py | elasticsearch/client/snapshot.py | SnapshotClient.get | def get(self, repository, snapshot, params=None):
"""
Retrieve information about a snapshot.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A repository name
:arg snapshot: A comma-separated list of snapshot names
... | python | def get(self, repository, snapshot, params=None):
"""
Retrieve information about a snapshot.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A repository name
:arg snapshot: A comma-separated list of snapshot names
... | [
"def",
"get",
"(",
"self",
",",
"repository",
",",
"snapshot",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"repository",
",",
"snapshot",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value ... | Retrieve information about a snapshot.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A repository name
:arg snapshot: A comma-separated list of snapshot names
:arg ignore_unavailable: Whether to ignore unavailable snapshots,
... | [
"Retrieve",
"information",
"about",
"a",
"snapshot",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"modules",
"-",
"snapshots",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L42-L60 | train |
elastic/elasticsearch-py | elasticsearch/client/snapshot.py | SnapshotClient.delete_repository | def delete_repository(self, repository, params=None):
"""
Removes a shared file system repository.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A comma-separated list of repository names
:arg master_timeout: Explicit... | python | def delete_repository(self, repository, params=None):
"""
Removes a shared file system repository.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A comma-separated list of repository names
:arg master_timeout: Explicit... | [
"def",
"delete_repository",
"(",
"self",
",",
"repository",
",",
"params",
"=",
"None",
")",
":",
"if",
"repository",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty value passed for a required argument 'repository'.\"",
")",
"return",
"self",
".",
"... | Removes a shared file system repository.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A comma-separated list of repository names
:arg master_timeout: Explicit operation timeout for connection to master
node
:arg ... | [
"Removes",
"a",
"shared",
"file",
"system",
"repository",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"modules",
"-",
"snapshots",
".",
"html",
">",
"_... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L63-L76 | train |
elastic/elasticsearch-py | elasticsearch/client/snapshot.py | SnapshotClient.get_repository | def get_repository(self, repository=None, params=None):
"""
Return information about registered repositories.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A comma-separated list of repository names
:arg local: Return... | python | def get_repository(self, repository=None, params=None):
"""
Return information about registered repositories.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A comma-separated list of repository names
:arg local: Return... | [
"def",
"get_repository",
"(",
"self",
",",
"repository",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_snapshot'",
",",
"repository",
")",
",",
"param... | Return information about registered repositories.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A comma-separated list of repository names
:arg local: Return local information, do not retrieve the state from
master node (... | [
"Return",
"information",
"about",
"registered",
"repositories",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"modules",
"-",
"snapshots",
".",
"html",
">",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L79-L91 | train |
elastic/elasticsearch-py | elasticsearch/client/snapshot.py | SnapshotClient.create_repository | def create_repository(self, repository, body, params=None):
"""
Registers a shared file system repository.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A repository name
:arg body: The repository definition
:... | python | def create_repository(self, repository, body, params=None):
"""
Registers a shared file system repository.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A repository name
:arg body: The repository definition
:... | [
"def",
"create_repository",
"(",
"self",
",",
"repository",
",",
"body",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"repository",
",",
"body",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
"ValueError",
"(",
"\"Empty ... | Registers a shared file system repository.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A repository name
:arg body: The repository definition
:arg master_timeout: Explicit operation timeout for connection to master
... | [
"Registers",
"a",
"shared",
"file",
"system",
"repository",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"modules",
"-",
"snapshots",
".",
"html",
">",
... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L94-L110 | train |
elastic/elasticsearch-py | elasticsearch/client/snapshot.py | SnapshotClient.restore | def restore(self, repository, snapshot, body=None, params=None):
"""
Restore a snapshot.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A repository name
:arg snapshot: A snapshot name
:arg body: Details of wha... | python | def restore(self, repository, snapshot, body=None, params=None):
"""
Restore a snapshot.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A repository name
:arg snapshot: A snapshot name
:arg body: Details of wha... | [
"def",
"restore",
"(",
"self",
",",
"repository",
",",
"snapshot",
",",
"body",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"for",
"param",
"in",
"(",
"repository",
",",
"snapshot",
")",
":",
"if",
"param",
"in",
"SKIP_IN_PATH",
":",
"raise",
... | Restore a snapshot.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A repository name
:arg snapshot: A snapshot name
:arg body: Details of what to restore
:arg master_timeout: Explicit operation timeout for connection t... | [
"Restore",
"a",
"snapshot",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"modules",
"-",
"snapshots",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L113-L130 | train |
elastic/elasticsearch-py | elasticsearch/client/snapshot.py | SnapshotClient.status | def status(self, repository=None, snapshot=None, params=None):
"""
Return information about all currently running snapshots. By specifying
a repository name, it's possible to limit the results to a particular
repository.
`<http://www.elastic.co/guide/en/elasticsearch/reference/cu... | python | def status(self, repository=None, snapshot=None, params=None):
"""
Return information about all currently running snapshots. By specifying
a repository name, it's possible to limit the results to a particular
repository.
`<http://www.elastic.co/guide/en/elasticsearch/reference/cu... | [
"def",
"status",
"(",
"self",
",",
"repository",
"=",
"None",
",",
"snapshot",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_snapshot'",
",",
"repos... | Return information about all currently running snapshots. By specifying
a repository name, it's possible to limit the results to a particular
repository.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_
:arg repository: A repository name
... | [
"Return",
"information",
"about",
"all",
"currently",
"running",
"snapshots",
".",
"By",
"specifying",
"a",
"repository",
"name",
"it",
"s",
"possible",
"to",
"limit",
"the",
"results",
"to",
"a",
"particular",
"repository",
".",
"<http",
":",
"//",
"www",
"... | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L133-L148 | train |
elastic/elasticsearch-py | elasticsearch/client/utils.py | _escape | def _escape(value):
"""
Escape a single value of a URL string or a query parameter. If it is a list
or tuple, turn it into a comma-separated string first.
"""
# make sequences into comma-separated stings
if isinstance(value, (list, tuple)):
value = ",".join(value)
# dates and datet... | python | def _escape(value):
"""
Escape a single value of a URL string or a query parameter. If it is a list
or tuple, turn it into a comma-separated string first.
"""
# make sequences into comma-separated stings
if isinstance(value, (list, tuple)):
value = ",".join(value)
# dates and datet... | [
"def",
"_escape",
"(",
"value",
")",
":",
"# make sequences into comma-separated stings",
"if",
"isinstance",
"(",
"value",
",",
"(",
"list",
",",
"tuple",
")",
")",
":",
"value",
"=",
"\",\"",
".",
"join",
"(",
"value",
")",
"# dates and datetimes into isoforma... | Escape a single value of a URL string or a query parameter. If it is a list
or tuple, turn it into a comma-separated string first. | [
"Escape",
"a",
"single",
"value",
"of",
"a",
"URL",
"string",
"or",
"a",
"query",
"parameter",
".",
"If",
"it",
"is",
"a",
"list",
"or",
"tuple",
"turn",
"it",
"into",
"a",
"comma",
"-",
"separated",
"string",
"first",
"."
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/utils.py#L12-L41 | train |
elastic/elasticsearch-py | elasticsearch/client/utils.py | _make_path | def _make_path(*parts):
"""
Create a URL string from parts, omit all `None` values and empty strings.
Convert lists and tuples to comma separated values.
"""
# TODO: maybe only allow some parts to be lists/tuples ?
return "/" + "/".join(
# preserve ',' and '*' in url for nicer URLs in lo... | python | def _make_path(*parts):
"""
Create a URL string from parts, omit all `None` values and empty strings.
Convert lists and tuples to comma separated values.
"""
# TODO: maybe only allow some parts to be lists/tuples ?
return "/" + "/".join(
# preserve ',' and '*' in url for nicer URLs in lo... | [
"def",
"_make_path",
"(",
"*",
"parts",
")",
":",
"# TODO: maybe only allow some parts to be lists/tuples ?",
"return",
"\"/\"",
"+",
"\"/\"",
".",
"join",
"(",
"# preserve ',' and '*' in url for nicer URLs in logs",
"quote_plus",
"(",
"_escape",
"(",
"p",
")",
",",
"b\... | Create a URL string from parts, omit all `None` values and empty strings.
Convert lists and tuples to comma separated values. | [
"Create",
"a",
"URL",
"string",
"from",
"parts",
"omit",
"all",
"None",
"values",
"and",
"empty",
"strings",
".",
"Convert",
"lists",
"and",
"tuples",
"to",
"comma",
"separated",
"values",
"."
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/utils.py#L44-L55 | train |
elastic/elasticsearch-py | elasticsearch/client/utils.py | query_params | def query_params(*es_query_params):
"""
Decorator that pops all accepted parameters from method's kwargs and puts
them in the params argument.
"""
def _wrapper(func):
@wraps(func)
def _wrapped(*args, **kwargs):
params = {}
if "params" in kwargs:
... | python | def query_params(*es_query_params):
"""
Decorator that pops all accepted parameters from method's kwargs and puts
them in the params argument.
"""
def _wrapper(func):
@wraps(func)
def _wrapped(*args, **kwargs):
params = {}
if "params" in kwargs:
... | [
"def",
"query_params",
"(",
"*",
"es_query_params",
")",
":",
"def",
"_wrapper",
"(",
"func",
")",
":",
"@",
"wraps",
"(",
"func",
")",
"def",
"_wrapped",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"params",
"=",
"{",
"}",
"if",
"\"params... | Decorator that pops all accepted parameters from method's kwargs and puts
them in the params argument. | [
"Decorator",
"that",
"pops",
"all",
"accepted",
"parameters",
"from",
"method",
"s",
"kwargs",
"and",
"puts",
"them",
"in",
"the",
"params",
"argument",
"."
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/utils.py#L62-L88 | train |
elastic/elasticsearch-py | elasticsearch/client/tasks.py | TasksClient.get | def get(self, task_id=None, params=None):
"""
Retrieve information for a particular task.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html>`_
:arg task_id: Return the task with specified id (node_id:task_number)
:arg wait_for_completion: Wait for the m... | python | def get(self, task_id=None, params=None):
"""
Retrieve information for a particular task.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html>`_
:arg task_id: Return the task with specified id (node_id:task_number)
:arg wait_for_completion: Wait for the m... | [
"def",
"get",
"(",
"self",
",",
"task_id",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"return",
"self",
".",
"transport",
".",
"perform_request",
"(",
"'GET'",
",",
"_make_path",
"(",
"'_tasks'",
",",
"task_id",
")",
",",
"params",
"=",
"params... | Retrieve information for a particular task.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html>`_
:arg task_id: Return the task with specified id (node_id:task_number)
:arg wait_for_completion: Wait for the matching tasks to complete
(default: false)
... | [
"Retrieve",
"information",
"for",
"a",
"particular",
"task",
".",
"<http",
":",
"//",
"www",
".",
"elastic",
".",
"co",
"/",
"guide",
"/",
"en",
"/",
"elasticsearch",
"/",
"reference",
"/",
"current",
"/",
"tasks",
".",
"html",
">",
"_"
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/tasks.py#L48-L59 | train |
elastic/elasticsearch-py | example/queries.py | print_hits | def print_hits(results):
" Simple utility function to print results of a search query. "
print_search_stats(results)
for hit in results['hits']['hits']:
# get created date for a repo and fallback to authored_date for a commit
created_at = parse_date(hit['_source'].get('created_at', hit['_sou... | python | def print_hits(results):
" Simple utility function to print results of a search query. "
print_search_stats(results)
for hit in results['hits']['hits']:
# get created date for a repo and fallback to authored_date for a commit
created_at = parse_date(hit['_source'].get('created_at', hit['_sou... | [
"def",
"print_hits",
"(",
"results",
")",
":",
"print_search_stats",
"(",
"results",
")",
"for",
"hit",
"in",
"results",
"[",
"'hits'",
"]",
"[",
"'hits'",
"]",
":",
"# get created date for a repo and fallback to authored_date for a commit",
"created_at",
"=",
"parse_... | Simple utility function to print results of a search query. | [
"Simple",
"utility",
"function",
"to",
"print",
"results",
"of",
"a",
"search",
"query",
"."
] | 2aab285c8f506f3863cbdaba3c90a685c510ba00 | https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/example/queries.py#L14-L26 | train |
fmfn/BayesianOptimization | examples/async_optimization.py | BayesianOptimizationHandler.post | def post(self):
"""Deal with incoming requests."""
body = tornado.escape.json_decode(self.request.body)
try:
self._bo.register(
params=body["params"],
target=body["target"],
)
print("BO has registered: {} points.".format(len(se... | python | def post(self):
"""Deal with incoming requests."""
body = tornado.escape.json_decode(self.request.body)
try:
self._bo.register(
params=body["params"],
target=body["target"],
)
print("BO has registered: {} points.".format(len(se... | [
"def",
"post",
"(",
"self",
")",
":",
"body",
"=",
"tornado",
".",
"escape",
".",
"json_decode",
"(",
"self",
".",
"request",
".",
"body",
")",
"try",
":",
"self",
".",
"_bo",
".",
"register",
"(",
"params",
"=",
"body",
"[",
"\"params\"",
"]",
","... | Deal with incoming requests. | [
"Deal",
"with",
"incoming",
"requests",
"."
] | 8ce2292895137477963cf1bafa4e71fa20b2ce49 | https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/examples/async_optimization.py#L42-L57 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.