diff --git a/docs/examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc b/docs/examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc index 820bb804e..e6d2dca28 100644 --- a/docs/examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc +++ b/docs/examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-elasticsearch.asciidoc:163 +// inference/service-elasticsearch.asciidoc:190 [source, python] ---- diff --git a/docs/examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc b/docs/examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc new file mode 100644 index 000000000..08aa0a8b3 --- /dev/null +++ b/docs/examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc @@ -0,0 +1,46 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:789 + +[source, python] +---- +resp = client.search( + index="retrievers_example", + retriever={ + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "range": { + "year": { + "gt": 2023 + } + } + } + } + }, + { + "standard": { + "query": { + "term": { + "topic": "elastic" + } + } + } + } + ], + "rank_window_size": 10, + "rank_constant": 1 + } + }, + source=False, + aggs={ + "topics": { + "terms": { + "field": "topic" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc b/docs/examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc new file mode 100644 index 000000000..5f9be5861 --- /dev/null +++ b/docs/examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:1101 + +[source, python] +---- +resp = client.inference.put( + task_type="rerank", + inference_id="my-rerank-model", + inference_config={ + "service": "cohere", + "service_settings": { + "model_id": "rerank-english-v3.0", + "api_key": "{{COHERE_API_KEY}}" + } + }, +) +print(resp) +---- diff --git a/docs/examples/0709a38613d2de90d418ce12b36af30e.asciidoc b/docs/examples/0709a38613d2de90d418ce12b36af30e.asciidoc index 719d89389..340a95e60 100644 --- a/docs/examples/0709a38613d2de90d418ce12b36af30e.asciidoc +++ b/docs/examples/0709a38613d2de90d418ce12b36af30e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:109 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:113 [source, python] ---- diff --git a/docs/examples/0722b302b2b3275a988d858044f99d5d.asciidoc b/docs/examples/0722b302b2b3275a988d858044f99d5d.asciidoc new file mode 100644 index 000000000..abbb65005 --- /dev/null +++ b/docs/examples/0722b302b2b3275a988d858044f99d5d.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/aggs-tutorial.asciidoc:45 + +[source, python] +---- +resp = client.indices.get_mapping( + index="kibana_sample_data_ecommerce", +) +print(resp) +---- diff --git a/docs/examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc b/docs/examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc index 1407a4b6c..df912f513 100644 --- a/docs/examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc +++ b/docs/examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-elasticsearch.asciidoc:223 +// inference/service-elasticsearch.asciidoc:250 [source, python] ---- diff --git a/docs/examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc b/docs/examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc new file mode 100644 index 000000000..6287eb745 --- /dev/null +++ b/docs/examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc @@ -0,0 +1,57 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:550 + +[source, python] +---- +resp = client.search( + index="retrievers_example_nested", + retriever={ + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "nested": { + "path": "nested_field", + "inner_hits": { + "name": "nested_vector", + "_source": False, + "fields": [ + "nested_field.paragraph_id" + ] + }, + "query": { + "knn": { + "field": "nested_field.nested_vector", + "query_vector": [ + 1, + 0, + 0.5 + ], + "k": 10 + } + } + } + } + } + }, + { + "standard": { + "query": { + "term": { + "topic": "ai" + } + } + } + } + ], + "rank_window_size": 10, + "rank_constant": 1 + } + }, + source=[ + "topic" + ], +) +print(resp) +---- diff --git a/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc b/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc index 3e564fc3a..3cc5e8efb 100644 --- a/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc +++ b/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc @@ -1,10 +1,15 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-across-clusters.asciidoc:197 +// esql/esql-across-clusters.asciidoc:192 [source, python] ---- -resp = client.esql.async_query( - format="json", +resp = client.perform_request( + "POST", + "/_query/async", + params={ + "format": "json" + }, + headers={"Content-Type": "application/json"}, body={ "query": "\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ", "include_ccs_metadata": True diff --git a/docs/examples/160986f49758f4e8345d183a842f6351.asciidoc b/docs/examples/0c52af573c9401a2a687e86a4beb182b.asciidoc similarity index 78% rename from docs/examples/160986f49758f4e8345d183a842f6351.asciidoc rename to docs/examples/0c52af573c9401a2a687e86a4beb182b.asciidoc index 7b460b136..8a7a866b5 100644 --- a/docs/examples/160986f49758f4e8345d183a842f6351.asciidoc +++ b/docs/examples/0c52af573c9401a2a687e86a4beb182b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/attachment.asciidoc:165 +// ingest/processors/attachment.asciidoc:214 [source, python] ---- @@ -10,7 +10,7 @@ resp = client.ingest.put_pipeline( { "attachment": { "field": "data", - "remove_binary": False + "remove_binary": True } } ], diff --git a/docs/examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc b/docs/examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc new file mode 100644 index 000000000..3dc721421 --- /dev/null +++ b/docs/examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc @@ -0,0 +1,60 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:929 + +[source, python] +---- +resp = client.search( + index="retrievers_example", + retriever={ + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "term": { + "topic": "elastic" + } + } + } + }, + { + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "query_string": { + "query": "(information retrieval) OR (artificial intelligence)", + "default_field": "text" + } + } + } + }, + { + "knn": { + "field": "vector", + "query_vector": [ + 0.23, + 0.67, + 0.89 + ], + "k": 3, + "num_candidates": 5 + } + } + ], + "rank_window_size": 10, + "rank_constant": 1 + } + } + ], + "rank_window_size": 10, + "rank_constant": 1 + } + }, + source=False, + size=1, + explain=True, +) +print(resp) +---- diff --git a/docs/examples/0da747e9d98bae157d3520ff1b489ad4.asciidoc b/docs/examples/0da747e9d98bae157d3520ff1b489ad4.asciidoc index 259041fa3..95b8034eb 100644 --- a/docs/examples/0da747e9d98bae157d3520ff1b489ad4.asciidoc +++ b/docs/examples/0da747e9d98bae157d3520ff1b489ad4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// snapshot-restore/repository-s3.asciidoc:41 +// snapshot-restore/repository-s3.asciidoc:45 [source, python] ---- diff --git a/docs/examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc b/docs/examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc index fd7eec55f..fd6c947fe 100644 --- a/docs/examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc +++ b/docs/examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc @@ -3,8 +3,10 @@ [source, python] ---- -resp = client.search_application.render_query( - name="my-app", +resp = client.perform_request( + "POST", + "/_application/search_application/my-app/_render_query", + headers={"Content-Type": "application/json"}, body={ "params": { "query_string": "my first query", diff --git a/docs/examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc b/docs/examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc index 9e854328d..aab84e3d3 100644 --- a/docs/examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc +++ b/docs/examples/11e8d6e14686efabb8634b6522c05cb5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:455 +// search/search-your-data/highlighting.asciidoc:453 [source, python] ---- diff --git a/docs/examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc b/docs/examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc index 9478424ba..998ee76a1 100644 --- a/docs/examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc +++ b/docs/examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// vectors/vector-functions.asciidoc:401 +// vectors/vector-functions.asciidoc:405 [source, python] ---- diff --git a/docs/examples/16634cfa7916cf4e8048a1d70e6240f2.asciidoc b/docs/examples/16634cfa7916cf4e8048a1d70e6240f2.asciidoc index 4cd3c344a..52b0a6e97 100644 --- a/docs/examples/16634cfa7916cf4e8048a1d70e6240f2.asciidoc +++ b/docs/examples/16634cfa7916cf4e8048a1d70e6240f2.asciidoc @@ -12,7 +12,7 @@ resp = client.search_application.put( "template": { "script": { "lang": "mustache", - "source": "\n {\n \"query\": {\n \"bool\": {\n \"must\": [\n {{#query}}\n \n {{/query}}\n ],\n \"filter\": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n \"_source\": {\n \"includes\": [\"title\", \"plot\"]\n },\n \"highlight\": {\n \"fields\": {\n \"title\": { \"fragment_size\": 0 },\n \"plot\": { \"fragment_size\": 200 }\n }\n },\n \"aggs\": {{#toJson}}_es_aggs{{/toJson}},\n \"from\": {{from}},\n \"size\": {{size}},\n \"sort\": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ", + "source": "\n {\n \"query\": {\n \"bool\": {\n \"must\": [\n {{#query}}\n {{/query}}\n ],\n \"filter\": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n \"_source\": {\n \"includes\": [\"title\", \"plot\"]\n },\n \"highlight\": {\n \"fields\": {\n \"title\": { \"fragment_size\": 0 },\n \"plot\": { \"fragment_size\": 200 }\n }\n },\n \"aggs\": {{#toJson}}_es_aggs{{/toJson}},\n \"from\": {{from}},\n \"size\": {{size}},\n \"sort\": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ", "params": { "query": "", "_es_filters": {}, diff --git a/docs/examples/17a1e308761afd3282f13d44d7be008a.asciidoc b/docs/examples/17a1e308761afd3282f13d44d7be008a.asciidoc index ee6770cd1..5b1d31173 100644 --- a/docs/examples/17a1e308761afd3282f13d44d7be008a.asciidoc +++ b/docs/examples/17a1e308761afd3282f13d44d7be008a.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:687 +// search/search-your-data/highlighting.asciidoc:685 [source, python] ---- diff --git a/docs/examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc b/docs/examples/17b1647c8509543f2388c886f2584a20.asciidoc similarity index 86% rename from docs/examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc rename to docs/examples/17b1647c8509543f2388c886f2584a20.asciidoc index d50b44d64..bd99a92db 100644 --- a/docs/examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc +++ b/docs/examples/17b1647c8509543f2388c886f2584a20.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// reranking/semantic-reranking.asciidoc:105 +// reranking/semantic-reranking.asciidoc:107 [source, python] ---- @@ -16,7 +16,7 @@ resp = client.search( } }, "field": "text", - "inference_id": "my-cohere-rerank-model", + "inference_id": "elastic-rerank", "inference_text": "How often does the moon hide the sun?", "rank_window_size": 100, "min_score": 0.5 diff --git a/docs/examples/192fa1f6f51dfb640e9e15bb5cd7eebc.asciidoc b/docs/examples/192fa1f6f51dfb640e9e15bb5cd7eebc.asciidoc index 16e0c0f3b..e53c1cce6 100644 --- a/docs/examples/192fa1f6f51dfb640e9e15bb5cd7eebc.asciidoc +++ b/docs/examples/192fa1f6f51dfb640e9e15bb5cd7eebc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ilm/error-handling.asciidoc:147 +// ilm/error-handling.asciidoc:148 [source, python] ---- diff --git a/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc b/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc index 565dfeef0..14c5ebf96 100644 --- a/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc +++ b/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.simulate.ingest( +resp = client.perform_request( + "POST", + "/_ingest/_simulate", + headers={"Content-Type": "application/json"}, body={ "docs": [ { diff --git a/docs/examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc b/docs/examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc index fc3519cf1..13dde6669 100644 --- a/docs/examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc +++ b/docs/examples/1aa91d3d48140d6367b6cabca8737b8f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// docs/bulk.asciidoc:632 +// docs/bulk.asciidoc:636 [source, python] ---- diff --git a/docs/examples/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc b/docs/examples/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc index 6e8bc60ae..ebcd04ea5 100644 --- a/docs/examples/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc +++ b/docs/examples/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ilm/error-handling.asciidoc:18 +// ilm/error-handling.asciidoc:19 [source, python] ---- diff --git a/docs/examples/22b176a184517cf1b5801f5eb4f17f97.asciidoc b/docs/examples/22b176a184517cf1b5801f5eb4f17f97.asciidoc new file mode 100644 index 000000000..b641acec5 --- /dev/null +++ b/docs/examples/22b176a184517cf1b5801f5eb4f17f97.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// data-streams/downsampling-dsl.asciidoc:349 + +[source, python] +---- +resp = client.indices.rollover( + alias="datastream", +) +print(resp) +---- diff --git a/docs/examples/2577acb462b95bd4394523cf2f8a661f.asciidoc b/docs/examples/2577acb462b95bd4394523cf2f8a661f.asciidoc deleted file mode 100644 index d8e5f8698..000000000 --- a/docs/examples/2577acb462b95bd4394523cf2f8a661f.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// esql/processing-commands/lookup.asciidoc:30 - -[source, python] ----- -resp = client.esql.query( - format="txt", - query="\n FROM library\n | SORT page_count DESC\n | KEEP name, author\n | LOOKUP era ON author\n | LIMIT 5\n ", - tables={ - "era": { - "author": { - "keyword": [ - "Frank Herbert", - "Peter F. Hamilton", - "Vernor Vinge", - "Alastair Reynolds", - "James S.A. Corey" - ] - }, - "era": { - "keyword": [ - "The New Wave", - "Diamond", - "Diamond", - "Diamond", - "Hadron" - ] - } - } - }, -) -print(resp) ----- diff --git a/docs/examples/2646710ece0c4c843aebeacd370d0396.asciidoc b/docs/examples/2646710ece0c4c843aebeacd370d0396.asciidoc index 978eb8a86..0ff920cfb 100644 --- a/docs/examples/2646710ece0c4c843aebeacd370d0396.asciidoc +++ b/docs/examples/2646710ece0c4c843aebeacd370d0396.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/dense-vector.asciidoc:142 +// mapping/types/dense-vector.asciidoc:140 [source, python] ---- diff --git a/docs/examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc b/docs/examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc index e831ba094..5c9c0bf2b 100644 --- a/docs/examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc +++ b/docs/examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.security.oidc_logout( +resp = client.perform_request( + "POST", + "/_security/oidc/logout", + headers={"Content-Type": "application/json"}, body={ "token": "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", "refresh_token": "vLBPvmAB6KvwvJZr27cS" diff --git a/docs/examples/2a67608dadbf220a2f040f3a79d3677d.asciidoc b/docs/examples/2a67608dadbf220a2f040f3a79d3677d.asciidoc new file mode 100644 index 000000000..f349cd415 --- /dev/null +++ b/docs/examples/2a67608dadbf220a2f040f3a79d3677d.asciidoc @@ -0,0 +1,35 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/processors/attachment.asciidoc:162 + +[source, python] +---- +resp = client.ingest.put_pipeline( + id="attachment", + description="Extract attachment information including original binary", + processors=[ + { + "attachment": { + "field": "data", + "remove_binary": False + } + } + ], +) +print(resp) + +resp1 = client.index( + index="my-index-000001", + id="my_id", + pipeline="attachment", + document={ + "data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=" + }, +) +print(resp1) + +resp2 = client.get( + index="my-index-000001", + id="my_id", +) +print(resp2) +---- diff --git a/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc b/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc index e8b76eaa8..f074730ed 100644 --- a/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc +++ b/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc @@ -3,10 +3,12 @@ [source, python] ---- -resp = client.esql.async_query_get( - id="FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", - wait_for_completion_timeout="30s", - body=None, +resp = client.perform_request( + "GET", + "/_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", + params={ + "wait_for_completion_timeout": "30s" + }, ) print(resp) ---- diff --git a/docs/examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc b/docs/examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc deleted file mode 100644 index 7c611874c..000000000 --- a/docs/examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// migration/migrate_9_0/transient-settings-migration-guide.asciidoc:64 - -[source, python] ----- -resp = client.cluster.put_settings( - persistent={ - "cluster.indices.close.enable": False, - "indices.recovery.max_bytes_per_sec": "50mb" - }, - transient={ - "*": None - }, -) -print(resp) ----- diff --git a/docs/examples/2d0244c020075595acb625aa5ba8f455.asciidoc b/docs/examples/2d0244c020075595acb625aa5ba8f455.asciidoc index 3b4923e2b..483a812fc 100644 --- a/docs/examples/2d0244c020075595acb625aa5ba8f455.asciidoc +++ b/docs/examples/2d0244c020075595acb625aa5ba8f455.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/fields/synthetic-source.asciidoc:260 +// mapping/fields/synthetic-source.asciidoc:253 [source, python] ---- diff --git a/docs/examples/30d051f534aeb884176eedb2c11dac85.asciidoc b/docs/examples/30d051f534aeb884176eedb2c11dac85.asciidoc new file mode 100644 index 000000000..6bf1f747d --- /dev/null +++ b/docs/examples/30d051f534aeb884176eedb2c11dac85.asciidoc @@ -0,0 +1,23 @@ +// This file is autogenerated, DO NOT EDIT +// inference/service-elasticsearch.asciidoc:162 + +[source, python] +---- +resp = client.inference.put( + task_type="rerank", + inference_id="my-elastic-rerank", + inference_config={ + "service": "elasticsearch", + "service_settings": { + "model_id": ".rerank-v1", + "num_threads": 1, + "adaptive_allocations": { + "enabled": True, + "min_number_of_allocations": 1, + "max_number_of_allocations": 4 + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/339c4e5af9f9069ad9912aa574488b59.asciidoc b/docs/examples/339c4e5af9f9069ad9912aa574488b59.asciidoc index b027282dd..f0f281db4 100644 --- a/docs/examples/339c4e5af9f9069ad9912aa574488b59.asciidoc +++ b/docs/examples/339c4e5af9f9069ad9912aa574488b59.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// vectors/vector-functions.asciidoc:342 +// vectors/vector-functions.asciidoc:346 [source, python] ---- diff --git a/docs/examples/36d229f734adcdab00be266a7ce038b1.asciidoc b/docs/examples/36d229f734adcdab00be266a7ce038b1.asciidoc index b2740333f..161f9895a 100644 --- a/docs/examples/36d229f734adcdab00be266a7ce038b1.asciidoc +++ b/docs/examples/36d229f734adcdab00be266a7ce038b1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/dense-vector.asciidoc:406 +// mapping/types/dense-vector.asciidoc:403 [source, python] ---- diff --git a/docs/examples/38ba93890494bfa7beece58dffa44f98.asciidoc b/docs/examples/38ba93890494bfa7beece58dffa44f98.asciidoc index cf80b3ae8..e81a005e7 100644 --- a/docs/examples/38ba93890494bfa7beece58dffa44f98.asciidoc +++ b/docs/examples/38ba93890494bfa7beece58dffa44f98.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/semantic-text.asciidoc:207 +// mapping/types/semantic-text.asciidoc:220 [source, python] ---- diff --git a/docs/examples/397ab5f9ea0b69ae85038bb0b9915180.asciidoc b/docs/examples/397ab5f9ea0b69ae85038bb0b9915180.asciidoc index 404236df4..a8a6d1c8b 100644 --- a/docs/examples/397ab5f9ea0b69ae85038bb0b9915180.asciidoc +++ b/docs/examples/397ab5f9ea0b69ae85038bb0b9915180.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// data-streams/downsampling-ilm.asciidoc:512 +// data-streams/downsampling-dsl.asciidoc:523 [source, python] ---- diff --git a/docs/examples/3a2953fd81d65118a776c87a81530e15.asciidoc b/docs/examples/3a2953fd81d65118a776c87a81530e15.asciidoc index 1264164ad..4d97b6a1b 100644 --- a/docs/examples/3a2953fd81d65118a776c87a81530e15.asciidoc +++ b/docs/examples/3a2953fd81d65118a776c87a81530e15.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:593 +// search/search-your-data/highlighting.asciidoc:591 [source, python] ---- diff --git a/docs/examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc b/docs/examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc index 5d41900e4..838d1d3c4 100644 --- a/docs/examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc +++ b/docs/examples/3e278e6c193b4c17dbdc70670e15d78c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:642 +// search/search-your-data/highlighting.asciidoc:640 [source, python] ---- diff --git a/docs/examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc b/docs/examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc index 680282f79..2191e80d4 100644 --- a/docs/examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc +++ b/docs/examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.esql.async_query( +resp = client.perform_request( + "POST", + "/_query/async", + headers={"Content-Type": "application/json"}, body={ "query": "\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", "wait_for_completion_timeout": "2s" diff --git a/docs/examples/3f9dcf2aa42f3ecfb5ebfe48c1774103.asciidoc b/docs/examples/3f9dcf2aa42f3ecfb5ebfe48c1774103.asciidoc new file mode 100644 index 000000000..7f8d2cc65 --- /dev/null +++ b/docs/examples/3f9dcf2aa42f3ecfb5ebfe48c1774103.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/aggs-tutorial.asciidoc:360 + +[source, python] +---- +resp = client.search( + index="kibana_sample_data_ecommerce", + size=0, + aggs={ + "order_stats": { + "stats": { + "field": "taxful_total_price" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc b/docs/examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc index 500d3e1c5..0ec5e8839 100644 --- a/docs/examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc +++ b/docs/examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc @@ -3,9 +3,9 @@ [source, python] ---- -resp = client.esql.async_query_get( - id="FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=", - body=None, +resp = client.perform_request( + "GET", + "/_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=", ) print(resp) ---- diff --git a/docs/examples/408060f0c52300588a6dee774f4fd6a5.asciidoc b/docs/examples/408060f0c52300588a6dee774f4fd6a5.asciidoc index 71728aef6..28a8deeb5 100644 --- a/docs/examples/408060f0c52300588a6dee774f4fd6a5.asciidoc +++ b/docs/examples/408060f0c52300588a6dee774f4fd6a5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// data-streams/downsampling-ilm.asciidoc:260 +// data-streams/downsampling-dsl.asciidoc:218 [source, python] ---- diff --git a/docs/examples/416a3ba11232d3c078c1c31340cf356f.asciidoc b/docs/examples/416a3ba11232d3c078c1c31340cf356f.asciidoc index e8318037b..e382d7af7 100644 --- a/docs/examples/416a3ba11232d3c078c1c31340cf356f.asciidoc +++ b/docs/examples/416a3ba11232d3c078c1c31340cf356f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:475 +// search/search-your-data/highlighting.asciidoc:473 [source, python] ---- diff --git a/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc b/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc index 14c7b4a3c..a6d261f47 100644 --- a/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc +++ b/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:235 +// search/retriever.asciidoc:236 [source, python] ---- diff --git a/docs/examples/44198781d164a15be633d4469485a544.asciidoc b/docs/examples/44198781d164a15be633d4469485a544.asciidoc index db8b96e88..b51ba5ba8 100644 --- a/docs/examples/44198781d164a15be633d4469485a544.asciidoc +++ b/docs/examples/44198781d164a15be633d4469485a544.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// vectors/vector-functions.asciidoc:379 +// vectors/vector-functions.asciidoc:383 [source, python] ---- diff --git a/docs/examples/44231f7cdd5c3a21025861cdef31e355.asciidoc b/docs/examples/44231f7cdd5c3a21025861cdef31e355.asciidoc index d4067263d..a88404872 100644 --- a/docs/examples/44231f7cdd5c3a21025861cdef31e355.asciidoc +++ b/docs/examples/44231f7cdd5c3a21025861cdef31e355.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:201 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:205 [source, python] ---- diff --git a/docs/examples/9f16fca9813304e398ee052aa857dbcd.asciidoc b/docs/examples/48e142e6c69014e0509d4c9251749d77.asciidoc similarity index 72% rename from docs/examples/9f16fca9813304e398ee052aa857dbcd.asciidoc rename to docs/examples/48e142e6c69014e0509d4c9251749d77.asciidoc index ecef289d9..f08aa2135 100644 --- a/docs/examples/9f16fca9813304e398ee052aa857dbcd.asciidoc +++ b/docs/examples/48e142e6c69014e0509d4c9251749d77.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-openai.asciidoc:141 +// inference/service-openai.asciidoc:147 [source, python] ---- @@ -10,7 +10,8 @@ resp = client.inference.put( "service": "openai", "service_settings": { "api_key": "", - "model_id": "text-embedding-ada-002" + "model_id": "text-embedding-3-small", + "dimensions": 128 } }, ) diff --git a/docs/examples/49b31e23f8b9667b6a7b2734d55fb6ed.asciidoc b/docs/examples/49b31e23f8b9667b6a7b2734d55fb6ed.asciidoc deleted file mode 100644 index a3fcb5fab..000000000 --- a/docs/examples/49b31e23f8b9667b6a7b2734d55fb6ed.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// search/knn-search.asciidoc:36 - -[source, python] ----- -resp = client.knn_search( - index="my-index", - knn={ - "field": "image_vector", - "query_vector": [ - 0.3, - 0.1, - 1.2 - ], - "k": 10, - "num_candidates": 100 - }, - source=[ - "name", - "file_type" - ], -) -print(resp) ----- diff --git a/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc b/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc index 46d369d7e..a23486bbb 100644 --- a/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc +++ b/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc @@ -3,9 +3,10 @@ [source, python] ---- -resp = client.inference.stream_inference( - task_type="completion", - inference_id="openai-completion", +resp = client.perform_request( + "POST", + "/_inference/completion/openai-completion/_stream", + headers={"Content-Type": "application/json"}, body={ "input": "What is Elastic?" }, diff --git a/docs/examples/4bef98a2dac575a50ee0783c2269f1db.asciidoc b/docs/examples/4bef98a2dac575a50ee0783c2269f1db.asciidoc index 3a7b0bcd6..d1aac9774 100644 --- a/docs/examples/4bef98a2dac575a50ee0783c2269f1db.asciidoc +++ b/docs/examples/4bef98a2dac575a50ee0783c2269f1db.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/dense-vector.asciidoc:500 +// mapping/types/dense-vector.asciidoc:497 [source, python] ---- diff --git a/docs/examples/4c5f0d7af287618062bb627b44ccb23e.asciidoc b/docs/examples/4c5f0d7af287618062bb627b44ccb23e.asciidoc index 4d151a625..d57c0b8ce 100644 --- a/docs/examples/4c5f0d7af287618062bb627b44ccb23e.asciidoc +++ b/docs/examples/4c5f0d7af287618062bb627b44ccb23e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:192 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:196 [source, python] ---- diff --git a/docs/examples/4c9350ed09b28f00e297ebe73c3b95a2.asciidoc b/docs/examples/4c9350ed09b28f00e297ebe73c3b95a2.asciidoc index df7d893d3..7b722d9d8 100644 --- a/docs/examples/4c9350ed09b28f00e297ebe73c3b95a2.asciidoc +++ b/docs/examples/4c9350ed09b28f00e297ebe73c3b95a2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-elasticsearch.asciidoc:195 +// inference/service-elasticsearch.asciidoc:222 [source, python] ---- diff --git a/docs/examples/4ca15672fc5ab1d80a127d086b6d2837.asciidoc b/docs/examples/4ca15672fc5ab1d80a127d086b6d2837.asciidoc index 77d2d7733..20d45a996 100644 --- a/docs/examples/4ca15672fc5ab1d80a127d086b6d2837.asciidoc +++ b/docs/examples/4ca15672fc5ab1d80a127d086b6d2837.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/allocation-explain.asciidoc:447 +// cluster/allocation-explain.asciidoc:451 [source, python] ---- diff --git a/docs/examples/4dab4c5168047ba596af1beb0e55b845.asciidoc b/docs/examples/4dab4c5168047ba596af1beb0e55b845.asciidoc deleted file mode 100644 index 314cff18a..000000000 --- a/docs/examples/4dab4c5168047ba596af1beb0e55b845.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// migration/migrate_9_0/transient-settings-migration-guide.asciidoc:82 - -[source, python] ----- -resp = client.cluster.get_settings( - flat_settings=True, -) -print(resp) ----- diff --git a/docs/examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc b/docs/examples/4edfb5934d14ad7655bd7e19a112b5c0.asciidoc similarity index 92% rename from docs/examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc rename to docs/examples/4edfb5934d14ad7655bd7e19a112b5c0.asciidoc index 157634563..562471a1c 100644 --- a/docs/examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc +++ b/docs/examples/4edfb5934d14ad7655bd7e19a112b5c0.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// quickstart/full-text-filtering-tutorial.asciidoc:521 +// quickstart/full-text-filtering-tutorial.asciidoc:522 [source, python] ---- @@ -8,11 +8,6 @@ resp = client.search( query={ "bool": { "must": [ - { - "term": { - "category.keyword": "Main Course" - } - }, { "term": { "tags": "vegetarian" @@ -27,6 +22,11 @@ resp = client.search( } ], "should": [ + { + "term": { + "category": "Main Course" + } + }, { "multi_match": { "query": "curry spicy", diff --git a/docs/examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc b/docs/examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc index 8e43ea56c..6b8eea73e 100644 --- a/docs/examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc +++ b/docs/examples/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:574 +// search/search-your-data/highlighting.asciidoc:572 [source, python] ---- diff --git a/docs/examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc b/docs/examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc index ed884ed78..2636250c5 100644 --- a/docs/examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc +++ b/docs/examples/4ff2dcec03fe097075cf1d174a019a1f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:709 +// search/search-your-data/highlighting.asciidoc:707 [source, python] ---- diff --git a/docs/examples/50d9c0508ddb0fc5ba5a893eec219dd8.asciidoc b/docs/examples/50d9c0508ddb0fc5ba5a893eec219dd8.asciidoc index 98b732223..a078c4d75 100644 --- a/docs/examples/50d9c0508ddb0fc5ba5a893eec219dd8.asciidoc +++ b/docs/examples/50d9c0508ddb0fc5ba5a893eec219dd8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/fields/synthetic-source.asciidoc:136 +// mapping/fields/synthetic-source.asciidoc:129 [source, python] ---- diff --git a/docs/examples/511e5bb8ab881171b7e8629095e30b85.asciidoc b/docs/examples/511e5bb8ab881171b7e8629095e30b85.asciidoc index f99c9de99..0b4ccfb09 100644 --- a/docs/examples/511e5bb8ab881171b7e8629095e30b85.asciidoc +++ b/docs/examples/511e5bb8ab881171b7e8629095e30b85.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// data-streams/downsampling-ilm.asciidoc:417 +// data-streams/downsampling-dsl.asciidoc:400 [source, python] ---- diff --git a/docs/examples/51b44224feee6e2e5974824334474c77.asciidoc b/docs/examples/51b44224feee6e2e5974824334474c77.asciidoc index 9aada93d3..93e483a64 100644 --- a/docs/examples/51b44224feee6e2e5974824334474c77.asciidoc +++ b/docs/examples/51b44224feee6e2e5974824334474c77.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// snapshot-restore/repository-s3.asciidoc:364 +// snapshot-restore/repository-s3.asciidoc:371 [source, python] ---- diff --git a/docs/examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc b/docs/examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc new file mode 100644 index 000000000..40f6deb33 --- /dev/null +++ b/docs/examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc @@ -0,0 +1,17 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/processors/inference.asciidoc:784 + +[source, python] +---- +resp = client.ingest.simulate( + id="query_helper_pipeline", + docs=[ + { + "_source": { + "content": "artificial intelligence in medicine articles published in the last 12 months" + } + } + ], +) +print(resp) +---- diff --git a/docs/examples/565386eee0951865a684e41fab53b40c.asciidoc b/docs/examples/565386eee0951865a684e41fab53b40c.asciidoc index 449bbfbe6..2b1dc035a 100644 --- a/docs/examples/565386eee0951865a684e41fab53b40c.asciidoc +++ b/docs/examples/565386eee0951865a684e41fab53b40c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-elser.asciidoc:162 +// inference/service-elser.asciidoc:119 [source, python] ---- diff --git a/docs/examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc b/docs/examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc index a18b9a0a8..7f7045e6e 100644 --- a/docs/examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc +++ b/docs/examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.security.oidc_prepare_authentication( +resp = client.perform_request( + "POST", + "/_security/oidc/prepare", + headers={"Content-Type": "application/json"}, body={ "realm": "oidc1", "state": "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO", diff --git a/docs/examples/5969c446688c8b326acc80276573e9d2.asciidoc b/docs/examples/5969c446688c8b326acc80276573e9d2.asciidoc index fd1bb3e8e..411f337f2 100644 --- a/docs/examples/5969c446688c8b326acc80276573e9d2.asciidoc +++ b/docs/examples/5969c446688c8b326acc80276573e9d2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:312 +// search/search-your-data/highlighting.asciidoc:310 [source, python] ---- diff --git a/docs/examples/59d736a4d064ed2013c7ead8e32e0998.asciidoc b/docs/examples/59d736a4d064ed2013c7ead8e32e0998.asciidoc index e0e4ba3c9..d0d2dd8a7 100644 --- a/docs/examples/59d736a4d064ed2013c7ead8e32e0998.asciidoc +++ b/docs/examples/59d736a4d064ed2013c7ead8e32e0998.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-openai.asciidoc:157 +// inference/service-openai.asciidoc:163 [source, python] ---- diff --git a/docs/examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc b/docs/examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc deleted file mode 100644 index 157fc4da6..000000000 --- a/docs/examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-text-hybrid-search:56 - -[source, python] ----- -resp = client.indices.create( - index="semantic-embeddings", - mappings={ - "properties": { - "semantic_text": { - "type": "semantic_text", - "inference_id": "my-elser-endpoint" - }, - "content": { - "type": "text", - "copy_to": "semantic_text" - } - } - }, -) -print(resp) ----- diff --git a/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc b/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc index 02874e925..1bf8744d9 100644 --- a/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc +++ b/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc @@ -1,10 +1,15 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-across-clusters.asciidoc:301 +// esql/esql-across-clusters.asciidoc:296 [source, python] ---- -resp = client.esql.async_query( - format="json", +resp = client.perform_request( + "POST", + "/_query/async", + params={ + "format": "json" + }, + headers={"Content-Type": "application/json"}, body={ "query": "\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ", "include_ccs_metadata": True diff --git a/docs/examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc b/docs/examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc index b873d1d6e..1112278fe 100644 --- a/docs/examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc +++ b/docs/examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/inference-apis.asciidoc:98 +// inference/inference-apis.asciidoc:111 [source, python] ---- diff --git a/docs/examples/5cf12cc4f98d98dc79bead7e6556679c.asciidoc b/docs/examples/5cf12cc4f98d98dc79bead7e6556679c.asciidoc index 25d500e11..b920f8437 100644 --- a/docs/examples/5cf12cc4f98d98dc79bead7e6556679c.asciidoc +++ b/docs/examples/5cf12cc4f98d98dc79bead7e6556679c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/fields/synthetic-source.asciidoc:17 +// mapping/fields/synthetic-source.asciidoc:10 [source, python] ---- diff --git a/docs/examples/5e415c490a46358643ee2aab554b4876.asciidoc b/docs/examples/5e415c490a46358643ee2aab554b4876.asciidoc index b86c34e4d..89b3587f7 100644 --- a/docs/examples/5e415c490a46358643ee2aab554b4876.asciidoc +++ b/docs/examples/5e415c490a46358643ee2aab554b4876.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:57 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:59 [source, python] ---- diff --git a/docs/examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc b/docs/examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc index a84be9f9e..212650bef 100644 --- a/docs/examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc +++ b/docs/examples/5ea9da129ca70a5fe534f27a82d80b29.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:669 +// search/search-your-data/highlighting.asciidoc:667 [source, python] ---- diff --git a/docs/examples/5f16358ebb5d14b86f57612d5f92d923.asciidoc b/docs/examples/5f16358ebb5d14b86f57612d5f92d923.asciidoc new file mode 100644 index 000000000..dfd5e16b6 --- /dev/null +++ b/docs/examples/5f16358ebb5d14b86f57612d5f92d923.asciidoc @@ -0,0 +1,17 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/types/semantic-text.asciidoc:25 + +[source, python] +---- +resp = client.indices.create( + index="my-index-000001", + mappings={ + "properties": { + "inference_field": { + "type": "semantic_text" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/5f8acd1e367b048b5542dbc6079bcc88.asciidoc b/docs/examples/5f8acd1e367b048b5542dbc6079bcc88.asciidoc index 5b8040c61..3d8c97850 100644 --- a/docs/examples/5f8acd1e367b048b5542dbc6079bcc88.asciidoc +++ b/docs/examples/5f8acd1e367b048b5542dbc6079bcc88.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/tokenfilters/hyphenation-decompounder-tokenfilter.asciidoc:132 +// analysis/tokenfilters/hyphenation-decompounder-tokenfilter.asciidoc:144 [source, python] ---- diff --git a/docs/examples/62d3c8fccb11471bdc12555c1a7777f2.asciidoc b/docs/examples/62d3c8fccb11471bdc12555c1a7777f2.asciidoc index e772c2097..3e5631809 100644 --- a/docs/examples/62d3c8fccb11471bdc12555c1a7777f2.asciidoc +++ b/docs/examples/62d3c8fccb11471bdc12555c1a7777f2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/fields/synthetic-source.asciidoc:100 +// mapping/fields/synthetic-source.asciidoc:93 [source, python] ---- diff --git a/docs/examples/63ecdab34940af053acc409164914c32.asciidoc b/docs/examples/63ecdab34940af053acc409164914c32.asciidoc index c44c3147f..0c5d51106 100644 --- a/docs/examples/63ecdab34940af053acc409164914c32.asciidoc +++ b/docs/examples/63ecdab34940af053acc409164914c32.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/sparse-vector.asciidoc:46 +// mapping/types/sparse-vector.asciidoc:63 [source, python] ---- diff --git a/docs/examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc b/docs/examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc index 2df817d3f..7e70eab6d 100644 --- a/docs/examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc +++ b/docs/examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/stats.asciidoc:1902 +// cluster/stats.asciidoc:1905 [source, python] ---- diff --git a/docs/examples/643e19c3b6ac1134554dd890e2249c2b.asciidoc b/docs/examples/643e19c3b6ac1134554dd890e2249c2b.asciidoc index 0c085cc7e..c77ffb136 100644 --- a/docs/examples/643e19c3b6ac1134554dd890e2249c2b.asciidoc +++ b/docs/examples/643e19c3b6ac1134554dd890e2249c2b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// data-streams/logs.asciidoc:18 +// data-streams/logs.asciidoc:20 [source, python] ---- diff --git a/docs/examples/64a79861225553799b26e118d7851dcc.asciidoc b/docs/examples/64a79861225553799b26e118d7851dcc.asciidoc index d9c6bb56c..1d24bea18 100644 --- a/docs/examples/64a79861225553799b26e118d7851dcc.asciidoc +++ b/docs/examples/64a79861225553799b26e118d7851dcc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ilm/error-handling.asciidoc:60 +// ilm/error-handling.asciidoc:61 [source, python] ---- diff --git a/docs/examples/674bb755111c6fbaa4c5ac759395c122.asciidoc b/docs/examples/674bb755111c6fbaa4c5ac759395c122.asciidoc index a61c8c89c..dc4f21124 100644 --- a/docs/examples/674bb755111c6fbaa4c5ac759395c122.asciidoc +++ b/docs/examples/674bb755111c6fbaa4c5ac759395c122.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:128 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:132 [source, python] ---- diff --git a/docs/examples/2fd458d37aab509fe2d970c0b6e2a10f.asciidoc b/docs/examples/68d7f7d4d268ee98caead5aef19933d6.asciidoc similarity index 98% rename from docs/examples/2fd458d37aab509fe2d970c0b6e2a10f.asciidoc rename to docs/examples/68d7f7d4d268ee98caead5aef19933d6.asciidoc index 54adac201..d486506c0 100644 --- a/docs/examples/2fd458d37aab509fe2d970c0b6e2a10f.asciidoc +++ b/docs/examples/68d7f7d4d268ee98caead5aef19933d6.asciidoc @@ -48,7 +48,7 @@ print(resp) resp1 = client.indices.put_index_template( name="2", index_patterns=[ - "k8s*" + "k9s*" ], composed_of=[ "destination_template" diff --git a/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc b/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc index 72ee5b9f0..38134aaf9 100644 --- a/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc +++ b/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:512 +// search/retriever.asciidoc:571 [source, python] ---- diff --git a/docs/examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc b/docs/examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc index b164965d1..aceae9924 100644 --- a/docs/examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc +++ b/docs/examples/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:499 +// search/search-your-data/highlighting.asciidoc:497 [source, python] ---- diff --git a/docs/examples/6b6fd0a5942dfb9762ad2790cf421a80.asciidoc b/docs/examples/6b6fd0a5942dfb9762ad2790cf421a80.asciidoc index 941c5899b..db8d1d9dc 100644 --- a/docs/examples/6b6fd0a5942dfb9762ad2790cf421a80.asciidoc +++ b/docs/examples/6b6fd0a5942dfb9762ad2790cf421a80.asciidoc @@ -12,7 +12,7 @@ resp = client.search_application.put( "template": { "script": { "lang": "mustache", - "source": "\n {\n \"query\": {\n \"bool\": {\n \"must\": [\n {{#query}}\n \n {{/query}}\n ],\n \"filter\": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n \"_source\": {\n \"includes\": [\"title\", \"plot\"]\n },\n \"aggs\": {{#toJson}}_es_aggs{{/toJson}},\n \"from\": {{from}},\n \"size\": {{size}},\n \"sort\": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ", + "source": "\n {\n \"query\": {\n \"bool\": {\n \"must\": [\n {{#query}}\n {{/query}}\n ],\n \"filter\": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n \"_source\": {\n \"includes\": [\"title\", \"plot\"]\n },\n \"aggs\": {{#toJson}}_es_aggs{{/toJson}},\n \"from\": {{from}},\n \"size\": {{size}},\n \"sort\": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ", "params": { "query": "", "_es_filters": {}, diff --git a/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc b/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc index 798e0b46a..a90ac37fb 100644 --- a/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc +++ b/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:328 +// search/retriever.asciidoc:329 [source, python] ---- diff --git a/docs/examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc b/docs/examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc index 0ffe6b433..97ad37206 100644 --- a/docs/examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc +++ b/docs/examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.security.bulk_update_api_keys( +resp = client.perform_request( + "POST", + "/_security/api_key/_bulk_update", + headers={"Content-Type": "application/json"}, body={ "ids": [ "VuaCfGcBCdbkQm-e5aOx", diff --git a/docs/examples/f9ee5d55a73f4c1fe7d507609047aefd.asciidoc b/docs/examples/6fa02c2ad485bbe91f44b321158250f3.asciidoc similarity index 69% rename from docs/examples/f9ee5d55a73f4c1fe7d507609047aefd.asciidoc rename to docs/examples/6fa02c2ad485bbe91f44b321158250f3.asciidoc index d74dee4b3..f5ab1b8f5 100644 --- a/docs/examples/f9ee5d55a73f4c1fe7d507609047aefd.asciidoc +++ b/docs/examples/6fa02c2ad485bbe91f44b321158250f3.asciidoc @@ -16,6 +16,15 @@ resp = client.search( ] } }, + highlight={ + "fields": { + "my_field": { + "matched_fields": [ + "my_field._index_prefix" + ] + } + } + }, ) print(resp) ---- diff --git a/docs/examples/71c629c44bf3c542a0daacbfc253c4b0.asciidoc b/docs/examples/71c629c44bf3c542a0daacbfc253c4b0.asciidoc index bd0b9c3ca..3238e48b8 100644 --- a/docs/examples/71c629c44bf3c542a0daacbfc253c4b0.asciidoc +++ b/docs/examples/71c629c44bf3c542a0daacbfc253c4b0.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/stats.asciidoc:1895 +// cluster/stats.asciidoc:1898 [source, python] ---- diff --git a/docs/examples/730045fae3743c39b612813a42c330c3.asciidoc b/docs/examples/730045fae3743c39b612813a42c330c3.asciidoc new file mode 100644 index 000000000..646e4225f --- /dev/null +++ b/docs/examples/730045fae3743c39b612813a42c330c3.asciidoc @@ -0,0 +1,26 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/params/index-prefixes.asciidoc:64 + +[source, python] +---- +resp = client.search( + index="my-index-000001", + query={ + "prefix": { + "full_name": { + "value": "ki" + } + } + }, + highlight={ + "fields": { + "full_name": { + "matched_fields": [ + "full_name._index_prefix" + ] + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc b/docs/examples/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc index 54424173c..c2d14e6ec 100644 --- a/docs/examples/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc +++ b/docs/examples/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:84 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:86 [source, python] ---- diff --git a/docs/examples/7478ff69113fb53f41ea07cdf911fa67.asciidoc b/docs/examples/7478ff69113fb53f41ea07cdf911fa67.asciidoc new file mode 100644 index 000000000..4fce43b61 --- /dev/null +++ b/docs/examples/7478ff69113fb53f41ea07cdf911fa67.asciidoc @@ -0,0 +1,33 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/aggs-tutorial.asciidoc:1343 + +[source, python] +---- +resp = client.search( + index="kibana_sample_data_ecommerce", + size=0, + aggs={ + "daily_sales": { + "date_histogram": { + "field": "order_date", + "calendar_interval": "day" + }, + "aggs": { + "daily_revenue": { + "sum": { + "field": "taxful_total_price" + } + }, + "smoothed_revenue": { + "moving_fn": { + "buckets_path": "daily_revenue", + "window": 3, + "script": "MovingFunctions.unweightedAvg(values)" + } + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/750ac969f9a05567f5cdf4f93d6244b6.asciidoc b/docs/examples/750ac969f9a05567f5cdf4f93d6244b6.asciidoc index 455c5f508..ef5e71196 100644 --- a/docs/examples/750ac969f9a05567f5cdf4f93d6244b6.asciidoc +++ b/docs/examples/750ac969f9a05567f5cdf4f93d6244b6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:248 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:252 [source, python] ---- diff --git a/docs/examples/76e02434835630cb830724beb92df354.asciidoc b/docs/examples/76e02434835630cb830724beb92df354.asciidoc new file mode 100644 index 000000000..a4e491d24 --- /dev/null +++ b/docs/examples/76e02434835630cb830724beb92df354.asciidoc @@ -0,0 +1,47 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:1171 + +[source, python] +---- +resp = client.search( + index="retrievers_example", + retriever={ + "rrf": { + "retrievers": [ + { + "knn": { + "field": "vector", + "query_vector": [ + 0.23, + 0.67, + 0.89 + ], + "k": 3, + "num_candidates": 5 + } + }, + { + "text_similarity_reranker": { + "retriever": { + "standard": { + "query": { + "term": { + "topic": "ai" + } + } + } + }, + "field": "text", + "inference_id": "my-rerank-model", + "inference_text": "Can I use generative AI to identify user intent and improve search relevance?" + } + } + ], + "rank_window_size": 10, + "rank_constant": 1 + } + }, + source=False, +) +print(resp) +---- diff --git a/docs/examples/7709a48020a6cefbbe547fb944541cdb.asciidoc b/docs/examples/7709a48020a6cefbbe547fb944541cdb.asciidoc index 7e83448bc..a7512d2e8 100644 --- a/docs/examples/7709a48020a6cefbbe547fb944541cdb.asciidoc +++ b/docs/examples/7709a48020a6cefbbe547fb944541cdb.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/dense-vector.asciidoc:423 +// mapping/types/dense-vector.asciidoc:420 [source, python] ---- diff --git a/docs/examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc b/docs/examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc index 12661f21d..fca5406ce 100644 --- a/docs/examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc +++ b/docs/examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.text_structure.find_message_structure( +resp = client.perform_request( + "POST", + "/_text_structure/find_message_structure", + headers={"Content-Type": "application/json"}, body={ "messages": [ "[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128", diff --git a/docs/examples/78043831fd32004a82930c8ac8a1d809.asciidoc b/docs/examples/78043831fd32004a82930c8ac8a1d809.asciidoc new file mode 100644 index 000000000..a029029fb --- /dev/null +++ b/docs/examples/78043831fd32004a82930c8ac8a1d809.asciidoc @@ -0,0 +1,48 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:1116 + +[source, python] +---- +resp = client.search( + index="retrievers_example", + retriever={ + "text_similarity_reranker": { + "retriever": { + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "query_string": { + "query": "(information retrieval) OR (artificial intelligence)", + "default_field": "text" + } + } + } + }, + { + "knn": { + "field": "vector", + "query_vector": [ + 0.23, + 0.67, + 0.89 + ], + "k": 3, + "num_candidates": 5 + } + } + ], + "rank_window_size": 10, + "rank_constant": 1 + } + }, + "field": "text", + "inference_id": "my-rerank-model", + "inference_text": "What are the state of the art applications of AI in information retrieval?" + } + }, + source=False, +) +print(resp) +---- diff --git a/docs/examples/78176cd6f570e1534bb40b19e6e900b6.asciidoc b/docs/examples/78176cd6f570e1534bb40b19e6e900b6.asciidoc index e0ae96d2b..62ff4fba8 100644 --- a/docs/examples/78176cd6f570e1534bb40b19e6e900b6.asciidoc +++ b/docs/examples/78176cd6f570e1534bb40b19e6e900b6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cat/alias.asciidoc:85 +// cat/alias.asciidoc:87 [source, python] ---- diff --git a/docs/examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc b/docs/examples/79d206a528be704050a437adce2496dd.asciidoc similarity index 53% rename from docs/examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc rename to docs/examples/79d206a528be704050a437adce2496dd.asciidoc index d27833994..fe9e6f4d2 100644 --- a/docs/examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc +++ b/docs/examples/79d206a528be704050a437adce2496dd.asciidoc @@ -1,20 +1,21 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-text-hybrid-search:20 +// search/retriever.asciidoc:452 [source, python] ---- resp = client.inference.put( - task_type="sparse_embedding", - inference_id="my-elser-endpoint", + task_type="rerank", + inference_id="my-elastic-rerank", inference_config={ - "service": "elser", + "service": "elasticsearch", "service_settings": { + "model_id": ".rerank-v1", + "num_threads": 1, "adaptive_allocations": { "enabled": True, - "min_number_of_allocations": 3, + "min_number_of_allocations": 1, "max_number_of_allocations": 10 - }, - "num_threads": 1 + } } }, ) diff --git a/docs/examples/58f6b72009512851843c7b7a20e9504a.asciidoc b/docs/examples/7a2fdfd7b0553d63440af7598f9ad867.asciidoc similarity index 84% rename from docs/examples/58f6b72009512851843c7b7a20e9504a.asciidoc rename to docs/examples/7a2fdfd7b0553d63440af7598f9ad867.asciidoc index 3fd25391d..f434960c2 100644 --- a/docs/examples/58f6b72009512851843c7b7a20e9504a.asciidoc +++ b/docs/examples/7a2fdfd7b0553d63440af7598f9ad867.asciidoc @@ -1,10 +1,10 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/semantic-text.asciidoc:42 +// mapping/types/semantic-text.asciidoc:62 [source, python] ---- resp = client.indices.create( - index="my-index-000002", + index="my-index-000003", mappings={ "properties": { "inference_field": { diff --git a/docs/examples/7ba29f0be2297b54a640b0a17d7ef5ca.asciidoc b/docs/examples/7ba29f0be2297b54a640b0a17d7ef5ca.asciidoc new file mode 100644 index 000000000..8dbfa5565 --- /dev/null +++ b/docs/examples/7ba29f0be2297b54a640b0a17d7ef5ca.asciidoc @@ -0,0 +1,11 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/apis/delete-ip-location-database.asciidoc:10 + +[source, python] +---- +resp = client.perform_request( + "DELETE", + "/_ingest/ip_location/database/my-database-id", +) +print(resp) +---- diff --git a/docs/examples/7dd0d9cc6c5982a2c003d301e90feeba.asciidoc b/docs/examples/7dd0d9cc6c5982a2c003d301e90feeba.asciidoc new file mode 100644 index 000000000..4a8fcc25b --- /dev/null +++ b/docs/examples/7dd0d9cc6c5982a2c003d301e90feeba.asciidoc @@ -0,0 +1,37 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/aggs-tutorial.asciidoc:824 + +[source, python] +---- +resp = client.search( + index="kibana_sample_data_ecommerce", + size=0, + aggs={ + "daily_sales": { + "date_histogram": { + "field": "order_date", + "calendar_interval": "day", + "format": "yyyy-MM-dd" + }, + "aggs": { + "revenue": { + "sum": { + "field": "taxful_total_price" + } + }, + "unique_customers": { + "cardinality": { + "field": "customer_id" + } + }, + "avg_basket_size": { + "avg": { + "field": "total_quantity" + } + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/7de7e647c1c9cbe0a1df0d104fc0a947.asciidoc b/docs/examples/7de7e647c1c9cbe0a1df0d104fc0a947.asciidoc index 493a2bbd7..c5759f3ec 100644 --- a/docs/examples/7de7e647c1c9cbe0a1df0d104fc0a947.asciidoc +++ b/docs/examples/7de7e647c1c9cbe0a1df0d104fc0a947.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// snapshot-restore/repository-s3.asciidoc:20 +// snapshot-restore/repository-s3.asciidoc:23 [source, python] ---- diff --git a/docs/examples/7f2d511cb64743c006225e5933a14bb4.asciidoc b/docs/examples/7f2d511cb64743c006225e5933a14bb4.asciidoc index fd3323a81..4412a2a08 100644 --- a/docs/examples/7f2d511cb64743c006225e5933a14bb4.asciidoc +++ b/docs/examples/7f2d511cb64743c006225e5933a14bb4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-across-clusters.asciidoc:72 +// esql/esql-across-clusters.asciidoc:67 [source, python] ---- diff --git a/docs/examples/f4d0ef2e0f76babee83d999fe35127f2.asciidoc b/docs/examples/80135e8c644e34cc70ce8a4e7915d1a2.asciidoc similarity index 89% rename from docs/examples/f4d0ef2e0f76babee83d999fe35127f2.asciidoc rename to docs/examples/80135e8c644e34cc70ce8a4e7915d1a2.asciidoc index 9a29988d0..888fe890e 100644 --- a/docs/examples/f4d0ef2e0f76babee83d999fe35127f2.asciidoc +++ b/docs/examples/80135e8c644e34cc70ce8a4e7915d1a2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/attachment.asciidoc:267 +// ingest/processors/attachment.asciidoc:315 [source, python] ---- @@ -12,7 +12,7 @@ resp = client.ingest.put_pipeline( "field": "data", "indexed_chars": 11, "indexed_chars_field": "max_size", - "remove_binary": False + "remove_binary": True } } ], diff --git a/docs/examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc b/docs/examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc index 2f39bae89..00fbed0a4 100644 --- a/docs/examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc +++ b/docs/examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.security.bulk_update_api_keys( +resp = client.perform_request( + "POST", + "/_security/api_key/_bulk_update", + headers={"Content-Type": "application/json"}, body={ "ids": [ "VuaCfGcBCdbkQm-e5aOx", diff --git a/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc b/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc index c14704b5a..36f1759a6 100644 --- a/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc +++ b/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:601 +// search/retriever.asciidoc:660 [source, python] ---- diff --git a/docs/examples/8357aa6099089940589ae3e97e7bcffa.asciidoc b/docs/examples/8357aa6099089940589ae3e97e7bcffa.asciidoc index 0ae02fd4c..867b8527a 100644 --- a/docs/examples/8357aa6099089940589ae3e97e7bcffa.asciidoc +++ b/docs/examples/8357aa6099089940589ae3e97e7bcffa.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// data-streams/downsampling-ilm.asciidoc:381 +// data-streams/downsampling-dsl.asciidoc:362 [source, python] ---- diff --git a/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc b/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc index 70473d84b..656c01b11 100644 --- a/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc +++ b/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:640 +// search/retriever.asciidoc:699 [source, python] ---- diff --git a/docs/examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc b/docs/examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc index b7610f139..5ccdb979f 100644 --- a/docs/examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc +++ b/docs/examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-elasticsearch.asciidoc:248 +// inference/service-elasticsearch.asciidoc:275 [source, python] ---- diff --git a/docs/examples/c8fa8d7e029792d539464fede18ce258.asciidoc b/docs/examples/8a0b5f759de3f27f0801c1176e616117.asciidoc similarity index 75% rename from docs/examples/c8fa8d7e029792d539464fede18ce258.asciidoc rename to docs/examples/8a0b5f759de3f27f0801c1176e616117.asciidoc index e75f79036..4a66835cb 100644 --- a/docs/examples/c8fa8d7e029792d539464fede18ce258.asciidoc +++ b/docs/examples/8a0b5f759de3f27f0801c1176e616117.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-search-semantic-text.asciidoc:72 +// search/search-your-data/semantic-search-semantic-text.asciidoc:36 [source, python] ---- @@ -8,8 +8,7 @@ resp = client.indices.create( mappings={ "properties": { "content": { - "type": "semantic_text", - "inference_id": "my-elser-endpoint" + "type": "semantic_text" } } }, diff --git a/docs/examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc b/docs/examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc index 55f7d68aa..31bfc8362 100644 --- a/docs/examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc +++ b/docs/examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/fields/synthetic-source.asciidoc:231 +// mapping/fields/synthetic-source.asciidoc:224 [source, python] ---- diff --git a/docs/examples/8c639d3eef5c2de29e12bd9c6a42d3d4.asciidoc b/docs/examples/8c639d3eef5c2de29e12bd9c6a42d3d4.asciidoc new file mode 100644 index 000000000..124e138f6 --- /dev/null +++ b/docs/examples/8c639d3eef5c2de29e12bd9c6a42d3d4.asciidoc @@ -0,0 +1,39 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/aggs-tutorial.asciidoc:738 + +[source, python] +---- +resp = client.search( + index="kibana_sample_data_ecommerce", + size=0, + aggs={ + "categories": { + "terms": { + "field": "category.keyword", + "size": 5, + "order": { + "total_revenue": "desc" + } + }, + "aggs": { + "total_revenue": { + "sum": { + "field": "taxful_total_price" + } + }, + "avg_order_value": { + "avg": { + "field": "taxful_total_price" + } + }, + "total_items": { + "sum": { + "field": "total_quantity" + } + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc b/docs/examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc index 7140c60f2..b4294c381 100644 --- a/docs/examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc +++ b/docs/examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// docs/bulk.asciidoc:610 +// docs/bulk.asciidoc:614 [source, python] ---- diff --git a/docs/examples/8d9b04f2a97f4229dec9e620126de049.asciidoc b/docs/examples/8d9b04f2a97f4229dec9e620126de049.asciidoc index e175422ed..fdcc89bdb 100644 --- a/docs/examples/8d9b04f2a97f4229dec9e620126de049.asciidoc +++ b/docs/examples/8d9b04f2a97f4229dec9e620126de049.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// snapshot-restore/repository-s3.asciidoc:602 +// snapshot-restore/repository-s3.asciidoc:609 [source, python] ---- diff --git a/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc b/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc index 17091127e..2d06198c3 100644 --- a/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc +++ b/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:279 +// search/retriever.asciidoc:280 [source, python] ---- diff --git a/docs/examples/91e106a2affbc8df32cd940684a779ed.asciidoc b/docs/examples/91e106a2affbc8df32cd940684a779ed.asciidoc new file mode 100644 index 000000000..2ae56b1be --- /dev/null +++ b/docs/examples/91e106a2affbc8df32cd940684a779ed.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/apis/put-ip-location-database.asciidoc:16 + +[source, python] +---- +resp = client.perform_request( + "PUT", + "/_ingest/ip_location/database/my-database-1", + headers={"Content-Type": "application/json"}, + body={ + "name": "GeoIP2-Domain", + "maxmind": { + "account_id": "1234567" + } + }, +) +print(resp) +---- diff --git a/docs/examples/931817b168e055ecf738785c721125dd.asciidoc b/docs/examples/931817b168e055ecf738785c721125dd.asciidoc new file mode 100644 index 000000000..76c4ea122 --- /dev/null +++ b/docs/examples/931817b168e055ecf738785c721125dd.asciidoc @@ -0,0 +1,31 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/processors/inference.asciidoc:750 + +[source, python] +---- +resp = client.ingest.put_pipeline( + id="query_helper_pipeline", + processors=[ + { + "script": { + "source": "ctx.prompt = 'Please generate an elasticsearch search query on index `articles_index` for the following natural language query. Dates are in the field `@timestamp`, document types are in the field `type` (options are `news`, `publication`), categories in the field `category` and can be multiple (options are `medicine`, `pharmaceuticals`, `technology`), and document names are in the field `title` which should use a fuzzy match. Ignore fields which cannot be determined from the natural language query context: ' + ctx.content" + } + }, + { + "inference": { + "model_id": "openai_chat_completions", + "input_output": { + "input_field": "prompt", + "output_field": "query" + } + } + }, + { + "remove": { + "field": "prompt" + } + } + ], +) +print(resp) +---- diff --git a/docs/examples/935566d5426d44ade486a49ec5289741.asciidoc b/docs/examples/935566d5426d44ade486a49ec5289741.asciidoc index 920cadc2f..fade6a47d 100644 --- a/docs/examples/935566d5426d44ade486a49ec5289741.asciidoc +++ b/docs/examples/935566d5426d44ade486a49ec5289741.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-text-hybrid-search:113 +// search/search-your-data/semantic-text-hybrid-search:76 [source, python] ---- diff --git a/docs/examples/9382f022086c692ba05efb0acae65946.asciidoc b/docs/examples/9382f022086c692ba05efb0acae65946.asciidoc index 782786730..02ad2f12e 100644 --- a/docs/examples/9382f022086c692ba05efb0acae65946.asciidoc +++ b/docs/examples/9382f022086c692ba05efb0acae65946.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/fields/synthetic-source.asciidoc:70 +// mapping/fields/synthetic-source.asciidoc:63 [source, python] ---- diff --git a/docs/examples/8593715fcc70315a0816b435551258e0.asciidoc b/docs/examples/93c77c65f1e11382f8043d0300e87b89.asciidoc similarity index 79% rename from docs/examples/8593715fcc70315a0816b435551258e0.asciidoc rename to docs/examples/93c77c65f1e11382f8043d0300e87b89.asciidoc index 743b90211..244c8ef90 100644 --- a/docs/examples/8593715fcc70315a0816b435551258e0.asciidoc +++ b/docs/examples/93c77c65f1e11382f8043d0300e87b89.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/semantic-text.asciidoc:185 +// mapping/types/semantic-text.asciidoc:198 [source, python] ---- @@ -9,7 +9,7 @@ resp = client.indices.create( "properties": { "infer_field": { "type": "semantic_text", - "inference_id": "my-elser-endpoint" + "inference_id": ".elser-2-elasticsearch" }, "source_field": { "type": "text", diff --git a/docs/examples/968fb5b92aa65af09544f7c002b0953e.asciidoc b/docs/examples/968fb5b92aa65af09544f7c002b0953e.asciidoc index 134fe03d9..3746bf530 100644 --- a/docs/examples/968fb5b92aa65af09544f7c002b0953e.asciidoc +++ b/docs/examples/968fb5b92aa65af09544f7c002b0953e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-search-semantic-text.asciidoc:185 +// search/search-your-data/semantic-search-semantic-text.asciidoc:144 [source, python] ---- diff --git a/docs/examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc b/docs/examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc similarity index 67% rename from docs/examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc rename to docs/examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc index 0b123e38b..d3863750b 100644 --- a/docs/examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc +++ b/docs/examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc @@ -1,15 +1,15 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/semantic-text.asciidoc:21 +// mapping/types/semantic-text.asciidoc:41 [source, python] ---- resp = client.indices.create( - index="my-index-000001", + index="my-index-000002", mappings={ "properties": { "inference_field": { "type": "semantic_text", - "inference_id": "my-elser-endpoint" + "inference_id": "my-openai-endpoint" } } }, diff --git a/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc b/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc index ffc1c6da8..15becbdcd 100644 --- a/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc +++ b/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:528 +// search/retriever.asciidoc:587 [source, python] ---- diff --git a/docs/examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc b/docs/examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc new file mode 100644 index 000000000..0fa33b76a --- /dev/null +++ b/docs/examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc @@ -0,0 +1,41 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:99 + +[source, python] +---- +resp = client.search( + index="retrievers_example", + retriever={ + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "query_string": { + "query": "(information retrieval) OR (artificial intelligence)", + "default_field": "text" + } + } + } + }, + { + "knn": { + "field": "vector", + "query_vector": [ + 0.23, + 0.67, + 0.89 + ], + "k": 3, + "num_candidates": 5 + } + } + ], + "rank_window_size": 10, + "rank_constant": 1 + } + }, + source=False, +) +print(resp) +---- diff --git a/docs/examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc b/docs/examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc index 4129bbe4c..c75d87dbf 100644 --- a/docs/examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc +++ b/docs/examples/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:616 +// search/search-your-data/highlighting.asciidoc:614 [source, python] ---- diff --git a/docs/examples/99fb82d49ac477e6a9dfdd71f9465374.asciidoc b/docs/examples/99fb82d49ac477e6a9dfdd71f9465374.asciidoc new file mode 100644 index 000000000..3122bd126 --- /dev/null +++ b/docs/examples/99fb82d49ac477e6a9dfdd71f9465374.asciidoc @@ -0,0 +1,11 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/apis/delete-ip-location-database.asciidoc:52 + +[source, python] +---- +resp = client.perform_request( + "DELETE", + "/_ingest/ip_location/database/example-database-id", +) +print(resp) +---- diff --git a/docs/examples/9ab351893dae65ec97fd8cb6832950fb.asciidoc b/docs/examples/9ab351893dae65ec97fd8cb6832950fb.asciidoc index 6b763a1a6..fd9a11249 100644 --- a/docs/examples/9ab351893dae65ec97fd8cb6832950fb.asciidoc +++ b/docs/examples/9ab351893dae65ec97fd8cb6832950fb.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/knn-search.asciidoc:1124 +// search/search-your-data/knn-search.asciidoc:1126 [source, python] ---- diff --git a/docs/examples/9ad0864bcd665b63551e944653d32423.asciidoc b/docs/examples/9ad0864bcd665b63551e944653d32423.asciidoc index a6d007b6a..9615a7520 100644 --- a/docs/examples/9ad0864bcd665b63551e944653d32423.asciidoc +++ b/docs/examples/9ad0864bcd665b63551e944653d32423.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-text-hybrid-search:155 +// search/search-your-data/semantic-text-hybrid-search:118 [source, python] ---- diff --git a/docs/examples/9afa0844883b7471883aa378a8dd10b4.asciidoc b/docs/examples/9afa0844883b7471883aa378a8dd10b4.asciidoc index 15d83c81e..6ba1a2049 100644 --- a/docs/examples/9afa0844883b7471883aa378a8dd10b4.asciidoc +++ b/docs/examples/9afa0844883b7471883aa378a8dd10b4.asciidoc @@ -3,9 +3,10 @@ [source, python] ---- -resp = client.search_application.post_behavioral_analytics_event( - collection_name="my_analytics_collection", - event_type="search_click", +resp = client.perform_request( + "POST", + "/_application/analytics/my_analytics_collection/event/search_click", + headers={"Content-Type": "application/json"}, body={ "session": { "id": "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9" diff --git a/docs/examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc b/docs/examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc index 95150009b..60b3963b4 100644 --- a/docs/examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc +++ b/docs/examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.security.oidc_authenticate( +resp = client.perform_request( + "POST", + "/_security/oidc/authenticate", + headers={"Content-Type": "application/json"}, body={ "redirect_uri": "https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", "state": "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", diff --git a/docs/examples/9d47f02a063444da9f098858a1830d28.asciidoc b/docs/examples/9d47f02a063444da9f098858a1830d28.asciidoc index 0cef3692d..88fc79960 100644 --- a/docs/examples/9d47f02a063444da9f098858a1830d28.asciidoc +++ b/docs/examples/9d47f02a063444da9f098858a1830d28.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:210 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:214 [source, python] ---- diff --git a/docs/examples/a162eb50853331c80596f5994e9d1c38.asciidoc b/docs/examples/a162eb50853331c80596f5994e9d1c38.asciidoc index 2866e98b4..f8772be64 100644 --- a/docs/examples/a162eb50853331c80596f5994e9d1c38.asciidoc +++ b/docs/examples/a162eb50853331c80596f5994e9d1c38.asciidoc @@ -3,8 +3,10 @@ [source, python] ---- -resp = client.search_application.render_query( - name="my_search_application", +resp = client.perform_request( + "POST", + "/_application/search_application/my_search_application/_render_query", + headers={"Content-Type": "application/json"}, body={ "params": { "query_string": "rock climbing" diff --git a/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc b/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc index a603b404b..d3008aad3 100644 --- a/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc +++ b/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:448 +// search/retriever.asciidoc:507 [source, python] ---- diff --git a/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc b/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc index 67acc59e9..12acb042f 100644 --- a/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc +++ b/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/retriever.asciidoc:144 +// search/retriever.asciidoc:145 [source, python] ---- diff --git a/docs/examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc b/docs/examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc new file mode 100644 index 000000000..7ff456273 --- /dev/null +++ b/docs/examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc @@ -0,0 +1,27 @@ +// This file is autogenerated, DO NOT EDIT +// search/retriever.asciidoc:473 + +[source, python] +---- +resp = client.search( + retriever={ + "text_similarity_reranker": { + "retriever": { + "standard": { + "query": { + "match": { + "text": "How often does the moon hide the sun?" + } + } + } + }, + "field": "text", + "inference_id": "my-elastic-rerank", + "inference_text": "How often does the moon hide the sun?", + "rank_window_size": 100, + "min_score": 0.5 + } + }, +) +print(resp) +---- diff --git a/docs/examples/aaba346e0becdf12db13658296e0b8a1.asciidoc b/docs/examples/aaba346e0becdf12db13658296e0b8a1.asciidoc index 7a2fb484b..1969a302d 100644 --- a/docs/examples/aaba346e0becdf12db13658296e0b8a1.asciidoc +++ b/docs/examples/aaba346e0becdf12db13658296e0b8a1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ilm/error-handling.asciidoc:41 +// ilm/error-handling.asciidoc:42 [source, python] ---- diff --git a/docs/examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc b/docs/examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc new file mode 100644 index 000000000..6fd377757 --- /dev/null +++ b/docs/examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc @@ -0,0 +1,39 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:1223 + +[source, python] +---- +resp = client.search( + index="retrievers_example", + retriever={ + "text_similarity_reranker": { + "retriever": { + "text_similarity_reranker": { + "retriever": { + "knn": { + "field": "vector", + "query_vector": [ + 0.23, + 0.67, + 0.89 + ], + "k": 3, + "num_candidates": 5 + } + }, + "rank_window_size": 100, + "field": "text", + "inference_id": "my-rerank-model", + "inference_text": "What are the state of the art applications of AI in information retrieval?" + } + }, + "rank_window_size": 10, + "field": "text", + "inference_id": "my-other-more-expensive-rerank-model", + "inference_text": "Applications of Large Language Models in technology and their impact on user satisfaction" + } + }, + source=False, +) +print(resp) +---- diff --git a/docs/examples/7b9691bd34a02dd859562eb927f175e0.asciidoc b/docs/examples/ad9889fd8a4b5930e312a51f3bc996dc.asciidoc similarity index 83% rename from docs/examples/7b9691bd34a02dd859562eb927f175e0.asciidoc rename to docs/examples/ad9889fd8a4b5930e312a51f3bc996dc.asciidoc index 0fd593aaf..c5d8dc50d 100644 --- a/docs/examples/7b9691bd34a02dd859562eb927f175e0.asciidoc +++ b/docs/examples/ad9889fd8a4b5930e312a51f3bc996dc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-elasticsearch.asciidoc:132 +// inference/service-elasticsearch.asciidoc:131 [source, python] ---- @@ -12,7 +12,7 @@ resp = client.inference.put( "adaptive_allocations": { "enabled": True, "min_number_of_allocations": 1, - "max_number_of_allocations": 10 + "max_number_of_allocations": 4 }, "num_threads": 1, "model_id": ".elser_model_2" diff --git a/docs/examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc b/docs/examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc index 1651f5822..b8928b9ed 100644 --- a/docs/examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc +++ b/docs/examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// docs/bulk.asciidoc:499 +// docs/bulk.asciidoc:503 [source, python] ---- diff --git a/docs/examples/af607715d0693587dd12962266359a96.asciidoc b/docs/examples/af607715d0693587dd12962266359a96.asciidoc index c05664775..afd7cc471 100644 --- a/docs/examples/af607715d0693587dd12962266359a96.asciidoc +++ b/docs/examples/af607715d0693587dd12962266359a96.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// snapshot-restore/repository-s3.asciidoc:225 +// snapshot-restore/repository-s3.asciidoc:232 [source, python] ---- diff --git a/docs/examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc b/docs/examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc index 2ac514f11..671165a4a 100644 --- a/docs/examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc +++ b/docs/examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc @@ -3,9 +3,9 @@ [source, python] ---- -resp = client.search_application.render_query( - name="my_search_application", - body=None, +resp = client.perform_request( + "POST", + "/_application/search_application/my_search_application/_render_query", ) print(resp) ---- diff --git a/docs/examples/b590241c4296299b836fbb5a95bdd2dc.asciidoc b/docs/examples/b590241c4296299b836fbb5a95bdd2dc.asciidoc new file mode 100644 index 000000000..9cec50aa5 --- /dev/null +++ b/docs/examples/b590241c4296299b836fbb5a95bdd2dc.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/aggs-tutorial.asciidoc:299 + +[source, python] +---- +resp = client.search( + index="kibana_sample_data_ecommerce", + size=0, + aggs={ + "avg_order_value": { + "avg": { + "field": "taxful_total_price" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc b/docs/examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc index a785417c2..80b5bb881 100644 --- a/docs/examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc +++ b/docs/examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc @@ -186,10 +186,13 @@ resp = client.bulk( ) print(resp) -resp1 = client.text_structure.find_field_structure( - index="test-logs", - field="message", - body=None, +resp1 = client.perform_request( + "GET", + "/_text_structure/find_field_structure", + params={ + "index": "test-logs", + "field": "message" + }, ) print(resp1) ---- diff --git a/docs/examples/b6d278737d27973e498ac61cda9e5126.asciidoc b/docs/examples/b6d278737d27973e498ac61cda9e5126.asciidoc new file mode 100644 index 000000000..cb466a7e1 --- /dev/null +++ b/docs/examples/b6d278737d27973e498ac61cda9e5126.asciidoc @@ -0,0 +1,21 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/aggs-tutorial.asciidoc:509 + +[source, python] +---- +resp = client.search( + index="kibana_sample_data_ecommerce", + size=0, + aggs={ + "daily_orders": { + "date_histogram": { + "field": "order_date", + "calendar_interval": "day", + "format": "yyyy-MM-dd", + "min_doc_count": 0 + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/b6f690896001f8f9ad5bf24e1304a552.asciidoc b/docs/examples/b6f690896001f8f9ad5bf24e1304a552.asciidoc index 5b63289c6..11ce1ba81 100644 --- a/docs/examples/b6f690896001f8f9ad5bf24e1304a552.asciidoc +++ b/docs/examples/b6f690896001f8f9ad5bf24e1304a552.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/dense-vector.asciidoc:163 +// mapping/types/dense-vector.asciidoc:161 [source, python] ---- diff --git a/docs/examples/b728d6ba226dba719aadcd8b8099cc74.asciidoc b/docs/examples/b728d6ba226dba719aadcd8b8099cc74.asciidoc index 73ab3b7f8..8a0a34451 100644 --- a/docs/examples/b728d6ba226dba719aadcd8b8099cc74.asciidoc +++ b/docs/examples/b728d6ba226dba719aadcd8b8099cc74.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:174 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:178 [source, python] ---- diff --git a/docs/examples/b7df0848b2dc3093f931976db5b8cfff.asciidoc b/docs/examples/b7df0848b2dc3093f931976db5b8cfff.asciidoc index eb44d6b47..1b1f19f04 100644 --- a/docs/examples/b7df0848b2dc3093f931976db5b8cfff.asciidoc +++ b/docs/examples/b7df0848b2dc3093f931976db5b8cfff.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:32 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:34 [source, python] ---- diff --git a/docs/examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc b/docs/examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc new file mode 100644 index 000000000..f6db957ce --- /dev/null +++ b/docs/examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc @@ -0,0 +1,49 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:348 + +[source, python] +---- +resp = client.search( + index="retrievers_example", + retriever={ + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "query_string": { + "query": "(information retrieval) OR (artificial intelligence)", + "default_field": "text" + } + } + } + }, + { + "knn": { + "field": "vector", + "query_vector": [ + 0.23, + 0.67, + 0.89 + ], + "k": 3, + "num_candidates": 5 + } + } + ], + "rank_window_size": 10, + "rank_constant": 1 + } + }, + highlight={ + "fields": { + "text": { + "fragment_size": 150, + "number_of_fragments": 3 + } + } + }, + source=False, +) +print(resp) +---- diff --git a/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc b/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc index 4b72e7551..299222e54 100644 --- a/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc +++ b/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.simulate.ingest( +resp = client.perform_request( + "POST", + "/_ingest/_simulate", + headers={"Content-Type": "application/json"}, body={ "docs": [ { diff --git a/docs/examples/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc b/docs/examples/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc index 95a630fbe..24c08784c 100644 --- a/docs/examples/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc +++ b/docs/examples/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ilm/error-handling.asciidoc:121 +// ilm/error-handling.asciidoc:122 [source, python] ---- diff --git a/docs/examples/bdc55256fa5f701680631a149dbb75a9.asciidoc b/docs/examples/bdc55256fa5f701680631a149dbb75a9.asciidoc new file mode 100644 index 000000000..7699e4d0e --- /dev/null +++ b/docs/examples/bdc55256fa5f701680631a149dbb75a9.asciidoc @@ -0,0 +1,22 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/aggs-tutorial.asciidoc:420 + +[source, python] +---- +resp = client.search( + index="kibana_sample_data_ecommerce", + size=0, + aggs={ + "sales_by_category": { + "terms": { + "field": "category.keyword", + "size": 5, + "order": { + "_count": "desc" + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/bdd28276618235487ac96bd6679bc206.asciidoc b/docs/examples/bdd28276618235487ac96bd6679bc206.asciidoc new file mode 100644 index 000000000..a5bf8f7df --- /dev/null +++ b/docs/examples/bdd28276618235487ac96bd6679bc206.asciidoc @@ -0,0 +1,31 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/aggs-tutorial.asciidoc:1770 + +[source, python] +---- +resp = client.search( + index="kibana_sample_data_ecommerce", + size=0, + aggs={ + "daily_sales": { + "date_histogram": { + "field": "order_date", + "calendar_interval": "day" + }, + "aggs": { + "revenue": { + "sum": { + "field": "taxful_total_price" + } + }, + "cumulative_revenue": { + "cumulative_sum": { + "buckets_path": "revenue" + } + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/be5c5a9c25901737585e4fff9195da3c.asciidoc b/docs/examples/be5c5a9c25901737585e4fff9195da3c.asciidoc index ab6ef34d1..9592a2f32 100644 --- a/docs/examples/be5c5a9c25901737585e4fff9195da3c.asciidoc +++ b/docs/examples/be5c5a9c25901737585e4fff9195da3c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/dense-vector.asciidoc:437 +// mapping/types/dense-vector.asciidoc:434 [source, python] ---- diff --git a/docs/examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc b/docs/examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc new file mode 100644 index 000000000..7cb2d5916 --- /dev/null +++ b/docs/examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc @@ -0,0 +1,105 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:459 + +[source, python] +---- +resp = client.indices.create( + index="retrievers_example_nested", + mappings={ + "properties": { + "nested_field": { + "type": "nested", + "properties": { + "paragraph_id": { + "type": "keyword" + }, + "nested_vector": { + "type": "dense_vector", + "dims": 3, + "similarity": "l2_norm", + "index": True + } + } + }, + "topic": { + "type": "keyword" + } + } + }, +) +print(resp) + +resp1 = client.index( + index="retrievers_example_nested", + id="1", + document={ + "nested_field": [ + { + "paragraph_id": "1a", + "nested_vector": [ + -1.12, + -0.59, + 0.78 + ] + }, + { + "paragraph_id": "1b", + "nested_vector": [ + -0.12, + 1.56, + 0.42 + ] + }, + { + "paragraph_id": "1c", + "nested_vector": [ + 1, + -1, + 0 + ] + } + ], + "topic": [ + "ai" + ] + }, +) +print(resp1) + +resp2 = client.index( + index="retrievers_example_nested", + id="2", + document={ + "nested_field": [ + { + "paragraph_id": "2a", + "nested_vector": [ + 0.23, + 1.24, + 0.65 + ] + } + ], + "topic": [ + "information_retrieval" + ] + }, +) +print(resp2) + +resp3 = client.index( + index="retrievers_example_nested", + id="3", + document={ + "topic": [ + "ai" + ] + }, +) +print(resp3) + +resp4 = client.indices.refresh( + index="retrievers_example_nested", +) +print(resp4) +---- diff --git a/docs/examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc b/docs/examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc index 4f5c79684..39c93b487 100644 --- a/docs/examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc +++ b/docs/examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/knn-search.asciidoc:1167 +// search/search-your-data/knn-search.asciidoc:1169 [source, python] ---- diff --git a/docs/examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc b/docs/examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc index 11de217e5..23c293ac8 100644 --- a/docs/examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc +++ b/docs/examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-across-clusters.asciidoc:122 +// esql/esql-across-clusters.asciidoc:117 [source, python] ---- diff --git a/docs/examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc b/docs/examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc index 1cca191c4..f3e3cd83e 100644 --- a/docs/examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc +++ b/docs/examples/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// docs/bulk.asciidoc:711 +// docs/bulk.asciidoc:715 [source, python] ---- diff --git a/docs/examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc b/docs/examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc index 0c6394b4a..52c80cb16 100644 --- a/docs/examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc +++ b/docs/examples/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:410 +// search/search-your-data/highlighting.asciidoc:408 [source, python] ---- diff --git a/docs/examples/c38c882c642dd412e8fa4c3eed49d12f.asciidoc b/docs/examples/c38c882c642dd412e8fa4c3eed49d12f.asciidoc index c08062c1d..951ff74b1 100644 --- a/docs/examples/c38c882c642dd412e8fa4c3eed49d12f.asciidoc +++ b/docs/examples/c38c882c642dd412e8fa4c3eed49d12f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/search-as-you-type.asciidoc:147 +// mapping/types/search-as-you-type.asciidoc:162 [source, python] ---- diff --git a/docs/examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc b/docs/examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc index 3d3044f4a..ba601a2c4 100644 --- a/docs/examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc +++ b/docs/examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.security.bulk_update_api_keys( +resp = client.perform_request( + "POST", + "/_security/api_key/_bulk_update", + headers={"Content-Type": "application/json"}, body={ "ids": [ "VuaCfGcBCdbkQm-e5aOx", diff --git a/docs/examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc b/docs/examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc index 0bfaabd41..aaa9f110e 100644 --- a/docs/examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc +++ b/docs/examples/c9c396b94bb88098477e2b08b55a12ee.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// docs/bulk.asciidoc:764 +// docs/bulk.asciidoc:768 [source, python] ---- diff --git a/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc b/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc index f42b8b06d..9925e6256 100644 --- a/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc +++ b/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.simulate.ingest( +resp = client.perform_request( + "POST", + "/_ingest/_simulate", + headers={"Content-Type": "application/json"}, body={ "docs": [ { diff --git a/docs/examples/cd7da0c3769682f546cc1888e569382e.asciidoc b/docs/examples/cd7da0c3769682f546cc1888e569382e.asciidoc index b117cb26f..471a7c894 100644 --- a/docs/examples/cd7da0c3769682f546cc1888e569382e.asciidoc +++ b/docs/examples/cd7da0c3769682f546cc1888e569382e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:764 +// search/search-your-data/highlighting.asciidoc:762 [source, python] ---- diff --git a/docs/examples/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc b/docs/examples/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc index d61b8b76f..f73420eb9 100644 --- a/docs/examples/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc +++ b/docs/examples/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:153 +// troubleshooting/common-issues/red-yellow-cluster-status.asciidoc:157 [source, python] ---- diff --git a/docs/examples/ce2c2e8f5a2e4daf051b6e10122e5aae.asciidoc b/docs/examples/ce2c2e8f5a2e4daf051b6e10122e5aae.asciidoc index e6cd4cf1e..c0b2deb1a 100644 --- a/docs/examples/ce2c2e8f5a2e4daf051b6e10122e5aae.asciidoc +++ b/docs/examples/ce2c2e8f5a2e4daf051b6e10122e5aae.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/dense-vector.asciidoc:521 +// mapping/types/dense-vector.asciidoc:518 [source, python] ---- diff --git a/docs/examples/b26b5574438e4eaf146b2428bf537c51.asciidoc b/docs/examples/cecfaa659af6646b3b67d7b311586fa0.asciidoc similarity index 91% rename from docs/examples/b26b5574438e4eaf146b2428bf537c51.asciidoc rename to docs/examples/cecfaa659af6646b3b67d7b311586fa0.asciidoc index ad8b79e9a..dd81ff102 100644 --- a/docs/examples/b26b5574438e4eaf146b2428bf537c51.asciidoc +++ b/docs/examples/cecfaa659af6646b3b67d7b311586fa0.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/attachment.asciidoc:349 +// ingest/processors/attachment.asciidoc:396 [source, python] ---- @@ -14,7 +14,7 @@ resp = client.ingest.put_pipeline( "attachment": { "target_field": "_ingest._value.attachment", "field": "_ingest._value.data", - "remove_binary": False + "remove_binary": True } } } diff --git a/docs/examples/cedb56a71cc743d80263ce352bb21720.asciidoc b/docs/examples/cedb56a71cc743d80263ce352bb21720.asciidoc index c101699af..868bbf80a 100644 --- a/docs/examples/cedb56a71cc743d80263ce352bb21720.asciidoc +++ b/docs/examples/cedb56a71cc743d80263ce352bb21720.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-elser.asciidoc:113 +// inference/service-elser.asciidoc:148 [source, python] ---- diff --git a/docs/examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc b/docs/examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc deleted file mode 100644 index a696e0d6d..000000000 --- a/docs/examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// migration/migrate_9_0/transient-settings-migration-guide.asciidoc:38 - -[source, python] ----- -resp = client.cluster.get_settings( - flat_settings=True, - filter_path="transient", -) -print(resp) ----- diff --git a/docs/examples/d29031409016b2b798148ef173a196ae.asciidoc b/docs/examples/d29031409016b2b798148ef173a196ae.asciidoc new file mode 100644 index 000000000..a51a0ed9c --- /dev/null +++ b/docs/examples/d29031409016b2b798148ef173a196ae.asciidoc @@ -0,0 +1,24 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/types/semantic-text.asciidoc:131 + +[source, python] +---- +resp = client.indices.create( + index="test-index", + query={ + "semantic": { + "field": "my_semantic_field" + } + }, + highlight={ + "fields": { + "my_semantic_field": { + "type": "semantic", + "number_of_fragments": 2, + "order": "score" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc b/docs/examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc index 4edb74f87..bd47ca828 100644 --- a/docs/examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc +++ b/docs/examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.security.oidc_prepare_authentication( +resp = client.perform_request( + "POST", + "/_security/oidc/prepare", + headers={"Content-Type": "application/json"}, body={ "iss": "http://127.0.0.1:8080", "login_hint": "this_is_an_opaque_string" diff --git a/docs/examples/d4158d486e7fee2702a14068b69e3b33.asciidoc b/docs/examples/d4158d486e7fee2702a14068b69e3b33.asciidoc new file mode 100644 index 000000000..917e7bfd7 --- /dev/null +++ b/docs/examples/d4158d486e7fee2702a14068b69e3b33.asciidoc @@ -0,0 +1,156 @@ +// This file is autogenerated, DO NOT EDIT +// data-streams/downsampling-dsl.asciidoc:45 + +[source, python] +---- +resp = client.indices.put_index_template( + name="datastream_template", + index_patterns=[ + "datastream*" + ], + data_stream={}, + template={ + "lifecycle": { + "downsampling": [ + { + "after": "1m", + "fixed_interval": "1h" + } + ] + }, + "settings": { + "index": { + "mode": "time_series" + } + }, + "mappings": { + "properties": { + "@timestamp": { + "type": "date" + }, + "kubernetes": { + "properties": { + "container": { + "properties": { + "cpu": { + "properties": { + "usage": { + "properties": { + "core": { + "properties": { + "ns": { + "type": "long" + } + } + }, + "limit": { + "properties": { + "pct": { + "type": "float" + } + } + }, + "nanocores": { + "type": "long", + "time_series_metric": "gauge" + }, + "node": { + "properties": { + "pct": { + "type": "float" + } + } + } + } + } + } + }, + "memory": { + "properties": { + "available": { + "properties": { + "bytes": { + "type": "long", + "time_series_metric": "gauge" + } + } + }, + "majorpagefaults": { + "type": "long" + }, + "pagefaults": { + "type": "long", + "time_series_metric": "gauge" + }, + "rss": { + "properties": { + "bytes": { + "type": "long", + "time_series_metric": "gauge" + } + } + }, + "usage": { + "properties": { + "bytes": { + "type": "long", + "time_series_metric": "gauge" + }, + "limit": { + "properties": { + "pct": { + "type": "float" + } + } + }, + "node": { + "properties": { + "pct": { + "type": "float" + } + } + } + } + }, + "workingset": { + "properties": { + "bytes": { + "type": "long", + "time_series_metric": "gauge" + } + } + } + } + }, + "name": { + "type": "keyword" + }, + "start_time": { + "type": "date" + } + } + }, + "host": { + "type": "keyword", + "time_series_dimension": True + }, + "namespace": { + "type": "keyword", + "time_series_dimension": True + }, + "node": { + "type": "keyword", + "time_series_dimension": True + }, + "pod": { + "type": "keyword", + "time_series_dimension": True + } + } + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/d4df39f72d3a3b80cd4042f6a21c3f19.asciidoc b/docs/examples/d4df39f72d3a3b80cd4042f6a21c3f19.asciidoc new file mode 100644 index 000000000..4859346e4 --- /dev/null +++ b/docs/examples/d4df39f72d3a3b80cd4042f6a21c3f19.asciidoc @@ -0,0 +1,16 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/apis/put-ip-location-database.asciidoc:34 + +[source, python] +---- +resp = client.perform_request( + "PUT", + "/_ingest/ip_location/database/my-database-2", + headers={"Content-Type": "application/json"}, + body={ + "name": "standard_location", + "ipinfo": {} + }, +) +print(resp) +---- diff --git a/docs/examples/35fd9549350926f8d57dc1765e2f40d3.asciidoc b/docs/examples/d5242b1ab0213f25e5e0742032274ce6.asciidoc similarity index 94% rename from docs/examples/35fd9549350926f8d57dc1765e2f40d3.asciidoc rename to docs/examples/d5242b1ab0213f25e5e0742032274ce6.asciidoc index f70f2943f..1598f7708 100644 --- a/docs/examples/35fd9549350926f8d57dc1765e2f40d3.asciidoc +++ b/docs/examples/d5242b1ab0213f25e5e0742032274ce6.asciidoc @@ -10,7 +10,7 @@ resp = client.ingest.put_pipeline( { "attachment": { "field": "data", - "remove_binary": False + "remove_binary": True } } ], diff --git a/docs/examples/d8c053ee26c1533ce936ec81101d8e1b.asciidoc b/docs/examples/d8c053ee26c1533ce936ec81101d8e1b.asciidoc new file mode 100644 index 000000000..343d54530 --- /dev/null +++ b/docs/examples/d8c053ee26c1533ce936ec81101d8e1b.asciidoc @@ -0,0 +1,11 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/apis/get-ip-location-database.asciidoc:55 + +[source, python] +---- +resp = client.perform_request( + "GET", + "/_ingest/ip_location/database/my-database-id", +) +print(resp) +---- diff --git a/docs/examples/da0fe1316e5b8fd68e2a8525bcd8b0f6.asciidoc b/docs/examples/da0fe1316e5b8fd68e2a8525bcd8b0f6.asciidoc index 6670d51f8..b2d4e5719 100644 --- a/docs/examples/da0fe1316e5b8fd68e2a8525bcd8b0f6.asciidoc +++ b/docs/examples/da0fe1316e5b8fd68e2a8525bcd8b0f6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/recipes/scoring.asciidoc:168 +// how-to/recipes/scoring.asciidoc:169 [source, python] ---- diff --git a/docs/examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc b/docs/examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc index b26cee2dc..847593c02 100644 --- a/docs/examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc +++ b/docs/examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/knn-search.asciidoc:1215 +// search/search-your-data/knn-search.asciidoc:1217 [source, python] ---- diff --git a/docs/examples/dd71b0c9f9197684ff29c61062c55660.asciidoc b/docs/examples/dd71b0c9f9197684ff29c61062c55660.asciidoc index 9c29e08a5..b7dfcf0ca 100644 --- a/docs/examples/dd71b0c9f9197684ff29c61062c55660.asciidoc +++ b/docs/examples/dd71b0c9f9197684ff29c61062c55660.asciidoc @@ -3,6 +3,9 @@ [source, python] ---- -resp = client.security.get_settings() +resp = client.perform_request( + "GET", + "/_security/settings", +) print(resp) ---- diff --git a/docs/examples/a225fc8c134cb21a85bc6025dac9368b.asciidoc b/docs/examples/df81b88a2192dd6f9912e0c948a44487.asciidoc similarity index 91% rename from docs/examples/a225fc8c134cb21a85bc6025dac9368b.asciidoc rename to docs/examples/df81b88a2192dd6f9912e0c948a44487.asciidoc index 073a56a4e..7241e1518 100644 --- a/docs/examples/a225fc8c134cb21a85bc6025dac9368b.asciidoc +++ b/docs/examples/df81b88a2192dd6f9912e0c948a44487.asciidoc @@ -7,7 +7,7 @@ resp = client.inference.put( task_type="sparse_embedding", inference_id="elser_embeddings", inference_config={ - "service": "elser", + "service": "elasticsearch", "service_settings": { "num_allocations": 1, "num_threads": 1 diff --git a/docs/examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc b/docs/examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc index cc0793e90..bf1844b17 100644 --- a/docs/examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc +++ b/docs/examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.security.oidc_prepare_authentication( +resp = client.perform_request( + "POST", + "/_security/oidc/prepare", + headers={"Content-Type": "application/json"}, body={ "realm": "oidc1" }, diff --git a/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc b/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc index 54d3fd679..191ca7839 100644 --- a/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc +++ b/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.simulate.ingest( +resp = client.perform_request( + "POST", + "/_ingest/_simulate", + headers={"Content-Type": "application/json"}, body={ "docs": [ { diff --git a/docs/examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc b/docs/examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc new file mode 100644 index 000000000..f4e3c3c74 --- /dev/null +++ b/docs/examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc @@ -0,0 +1,50 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:192 + +[source, python] +---- +resp = client.search( + index="retrievers_example", + retriever={ + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "query_string": { + "query": "(information retrieval) OR (artificial intelligence)", + "default_field": "text" + } + } + } + }, + { + "knn": { + "field": "vector", + "query_vector": [ + 0.23, + 0.67, + 0.89 + ], + "k": 3, + "num_candidates": 5 + } + } + ], + "rank_window_size": 10, + "rank_constant": 1 + } + }, + collapse={ + "field": "year", + "inner_hits": { + "name": "topic related documents", + "_source": [ + "year" + ] + } + }, + source=False, +) +print(resp) +---- diff --git a/docs/examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc b/docs/examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc index 5efa745d0..f96b758e4 100644 --- a/docs/examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc +++ b/docs/examples/e6faae2e272ee57727f38e55a3de5bb2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:545 +// search/search-your-data/highlighting.asciidoc:543 [source, python] ---- diff --git a/docs/examples/5ba32ebaa7ee28a339c7693696d305ca.asciidoc b/docs/examples/e77c2f41a7eca765b0c5f734a66d919f.asciidoc similarity index 83% rename from docs/examples/5ba32ebaa7ee28a339c7693696d305ca.asciidoc rename to docs/examples/e77c2f41a7eca765b0c5f734a66d919f.asciidoc index 95de4965d..2cd80bb0e 100644 --- a/docs/examples/5ba32ebaa7ee28a339c7693696d305ca.asciidoc +++ b/docs/examples/e77c2f41a7eca765b0c5f734a66d919f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/attachment.asciidoc:137 +// ingest/processors/attachment.asciidoc:133 [source, python] ---- @@ -14,7 +14,7 @@ resp = client.ingest.put_pipeline( "content", "title" ], - "remove_binary": False + "remove_binary": True } } ], diff --git a/docs/examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc b/docs/examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc index daca718ee..0d8bfd524 100644 --- a/docs/examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc +++ b/docs/examples/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:434 +// search/search-your-data/highlighting.asciidoc:432 [source, python] ---- diff --git a/docs/examples/ea68e3428cc2ca3455bf312d09451489.asciidoc b/docs/examples/ea68e3428cc2ca3455bf312d09451489.asciidoc index cfee2236c..a017cdb8e 100644 --- a/docs/examples/ea68e3428cc2ca3455bf312d09451489.asciidoc +++ b/docs/examples/ea68e3428cc2ca3455bf312d09451489.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/knn-search.asciidoc:1080 +// search/search-your-data/knn-search.asciidoc:1082 [source, python] ---- diff --git a/docs/examples/bb5a1319c496acc862c670cc7224e59a.asciidoc b/docs/examples/ea8c4229afa6dd4f1321355542be9912.asciidoc similarity index 89% rename from docs/examples/bb5a1319c496acc862c670cc7224e59a.asciidoc rename to docs/examples/ea8c4229afa6dd4f1321355542be9912.asciidoc index 672d06ae5..8936ca63a 100644 --- a/docs/examples/bb5a1319c496acc862c670cc7224e59a.asciidoc +++ b/docs/examples/ea8c4229afa6dd4f1321355542be9912.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/attachment.asciidoc:219 +// ingest/processors/attachment.asciidoc:268 [source, python] ---- @@ -12,7 +12,7 @@ resp = client.ingest.put_pipeline( "field": "data", "indexed_chars": 11, "indexed_chars_field": "max_size", - "remove_binary": False + "remove_binary": True } } ], diff --git a/docs/examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc b/docs/examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc index 1e1e3bad5..a2e4b636d 100644 --- a/docs/examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc +++ b/docs/examples/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/highlighting.asciidoc:342 +// search/search-your-data/highlighting.asciidoc:340 [source, python] ---- diff --git a/docs/examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc b/docs/examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc new file mode 100644 index 000000000..732a99c3e --- /dev/null +++ b/docs/examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc @@ -0,0 +1,132 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/retrievers-examples.asciidoc:14 + +[source, python] +---- +resp = client.indices.create( + index="retrievers_example", + mappings={ + "properties": { + "vector": { + "type": "dense_vector", + "dims": 3, + "similarity": "l2_norm", + "index": True + }, + "text": { + "type": "text" + }, + "year": { + "type": "integer" + }, + "topic": { + "type": "keyword" + } + } + }, +) +print(resp) + +resp1 = client.index( + index="retrievers_example", + id="1", + document={ + "vector": [ + 0.23, + 0.67, + 0.89 + ], + "text": "Large language models are revolutionizing information retrieval by boosting search precision, deepening contextual understanding, and reshaping user experiences in data-rich environments.", + "year": 2024, + "topic": [ + "llm", + "ai", + "information_retrieval" + ] + }, +) +print(resp1) + +resp2 = client.index( + index="retrievers_example", + id="2", + document={ + "vector": [ + 0.12, + 0.56, + 0.78 + ], + "text": "Artificial intelligence is transforming medicine, from advancing diagnostics and tailoring treatment plans to empowering predictive patient care for improved health outcomes.", + "year": 2023, + "topic": [ + "ai", + "medicine" + ] + }, +) +print(resp2) + +resp3 = client.index( + index="retrievers_example", + id="3", + document={ + "vector": [ + 0.45, + 0.32, + 0.91 + ], + "text": "AI is redefining security by enabling advanced threat detection, proactive risk analysis, and dynamic defenses against increasingly sophisticated cyber threats.", + "year": 2024, + "topic": [ + "ai", + "security" + ] + }, +) +print(resp3) + +resp4 = client.index( + index="retrievers_example", + id="4", + document={ + "vector": [ + 0.34, + 0.21, + 0.98 + ], + "text": "Elastic introduces Elastic AI Assistant, the open, generative AI sidekick powered by ESRE to democratize cybersecurity and enable users of every skill level.", + "year": 2023, + "topic": [ + "ai", + "elastic", + "assistant" + ] + }, +) +print(resp4) + +resp5 = client.index( + index="retrievers_example", + id="5", + document={ + "vector": [ + 0.11, + 0.65, + 0.47 + ], + "text": "Learn how to spin up a deployment of our hosted Elasticsearch Service and use Elastic Observability to gain deeper insight into the behavior of your applications and systems.", + "year": 2024, + "topic": [ + "documentation", + "observability", + "elastic" + ] + }, +) +print(resp5) + +resp6 = client.indices.refresh( + index="retrievers_example", +) +print(resp6) +---- diff --git a/docs/examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc b/docs/examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc index 2b937027b..999c9d14e 100644 --- a/docs/examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc +++ b/docs/examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/dense-vector.asciidoc:184 +// mapping/types/dense-vector.asciidoc:182 [source, python] ---- diff --git a/docs/examples/f6f647eb644a2d236637ff05f833cb73.asciidoc b/docs/examples/f6f647eb644a2d236637ff05f833cb73.asciidoc index 3301985ae..1e70a342e 100644 --- a/docs/examples/f6f647eb644a2d236637ff05f833cb73.asciidoc +++ b/docs/examples/f6f647eb644a2d236637ff05f833cb73.asciidoc @@ -3,7 +3,10 @@ [source, python] ---- -resp = client.connector.secret_post( +resp = client.perform_request( + "POST", + "/_connector/_secret", + headers={"Content-Type": "application/json"}, body={ "value": "encoded_api_key" }, diff --git a/docs/examples/fe6e35839f7d7381f8ec535c8f21959b.asciidoc b/docs/examples/fe6e35839f7d7381f8ec535c8f21959b.asciidoc index 6eb08b8f0..a3d664e01 100644 --- a/docs/examples/fe6e35839f7d7381f8ec535c8f21959b.asciidoc +++ b/docs/examples/fe6e35839f7d7381f8ec535c8f21959b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/recipes/scoring.asciidoc:123 +// how-to/recipes/scoring.asciidoc:124 [source, python] ---- diff --git a/docs/guide/release-notes.asciidoc b/docs/guide/release-notes.asciidoc index b09fd4569..6a3c83391 100644 --- a/docs/guide/release-notes.asciidoc +++ b/docs/guide/release-notes.asciidoc @@ -1,6 +1,7 @@ [[release-notes]] == Release notes +* <> * <> * <> * <> @@ -42,6 +43,24 @@ * <> * <> +[discrete] +[[rn-8-17-0]] +=== 8.17.0 (2024-12-13) + +- Allow simsimd again on Python 3.13 (https://github.com/elastic/elasticsearch-py/pull/2722[#2722]) +- Update APIs: + * Mark all Inference APIs as stable. + * Add `allow_partial_search_results` to the Open Point in Time API + * Add `keep_alive` to the Get async search status API + * Remove the `keep_alive`, `pre_filter_shard_size` and `scroll` parameters from the Submit async search API. They were never supported. + * Add `master_timeout` and `timeout` to all autoscaling policy APIs + * Add `master_timeout` to the Alias exists and Get alias APIs + * Add `list_executed_pipelines` and `require_data_stream` to Bulk API + * Add `include_model_definition` to Get trained models API + * Add `meta` to Create data frame analytics API + * Add `aggs` to Create datafeeds API + * Add `allow_no_indices`, `expand_wildcards`, `ignore_throttled` and `ignore_unavailable` to Create anomaly detection jobs API + [discrete] [[rn-8-16-0]] === 8.16.0 (2024-11-12) diff --git a/elasticsearch/_version.py b/elasticsearch/_version.py index f1a7a85f5..610e04c1d 100644 --- a/elasticsearch/_version.py +++ b/elasticsearch/_version.py @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -__versionstr__ = "8.16.0" +__versionstr__ = "8.17.0" diff --git a/utils/generate-docs-examples/package-lock.json b/utils/generate-docs-examples/package-lock.json index 6c4f1bc41..60f3ff416 100644 --- a/utils/generate-docs-examples/package-lock.json +++ b/utils/generate-docs-examples/package-lock.json @@ -17,12 +17,11 @@ } }, "node_modules/@elastic/request-converter": { - "version": "8.16.1", - "resolved": "https://registry.npmjs.org/@elastic/request-converter/-/request-converter-8.16.1.tgz", - "integrity": "sha512-lg2qCJ4kyxsP/0NpZo0+NsJfaY4JwyxGIVqD2l2Vmx9tv7ZNaZMn/TjHKBo2+jN0laJBInpxpnkPUgVWo5kw1g==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@elastic/request-converter/-/request-converter-8.17.0.tgz", + "integrity": "sha512-f5WmQBbTdaDw9KrhVTuHeYbu0kulZfRUN9cNdFgCD78CRAVa353K1iqH5imikZ7NLIltN9itm5q5yyLvbHhs+w==", "license": "Apache-2.0", "dependencies": { - "child-process-promise": "^2.2.1", "commander": "^12.1.0", "find-my-way-ts": "^0.1.2", "handlebars": "^4.7.8", @@ -143,17 +142,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/child-process-promise": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/child-process-promise/-/child-process-promise-2.2.1.tgz", - "integrity": "sha512-Fi4aNdqBsr0mv+jgWxcZ/7rAIC2mgihrptyVI4foh/rrjY/3BNjfP9+oaiFx/fzim+1ZyCNBae0DlyfQhSugog==", - "license": "MIT", - "dependencies": { - "cross-spawn": "^4.0.2", - "node-version": "^1.0.0", - "promise-polyfill": "^6.0.1" - } - }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -220,16 +208,6 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "license": "MIT" }, - "node_modules/cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha512-yAXz/pA1tD8Gtg2S98Ekf/sewp3Lcp3YoFKJ4Hkp5h5yLWnKVTDU0kwjKJ8NDCYcfTLfyGkzTikst+jWypT1iA==", - "license": "MIT", - "dependencies": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, "node_modules/defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -363,12 +341,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -385,16 +357,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "license": "ISC", - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -451,15 +413,6 @@ } } }, - "node_modules/node-version": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/node-version/-/node-version-1.2.0.tgz", - "integrity": "sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -531,18 +484,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/promise-polyfill": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz", - "integrity": "sha512-g0LWaH0gFsxovsU7R5LrrhHhWAWiHRnh1GPrhXnPgYsDkIqjRYUYSZEsej/wtleDrz5xVSIDbeKfidztp2XHFQ==", - "license": "MIT" - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "license": "ISC" - }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -704,18 +645,6 @@ "webidl-conversions": "^3.0.0" } }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -727,12 +656,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "license": "ISC" - }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "license": "ISC" } } }