diff --git a/docs/examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc b/docs/examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc index b7885f45d..820bb804e 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:112 +// inference/service-elasticsearch.asciidoc:163 [source, python] ---- diff --git a/docs/examples/77113c65e1755313183a8969233a5a07.asciidoc b/docs/examples/01ae196538fac197eedbbf458a4ef31b.asciidoc similarity index 70% rename from docs/examples/77113c65e1755313183a8969233a5a07.asciidoc rename to docs/examples/01ae196538fac197eedbbf458a4ef31b.asciidoc index 2bce7f079..e087a80ec 100644 --- a/docs/examples/77113c65e1755313183a8969233a5a07.asciidoc +++ b/docs/examples/01ae196538fac197eedbbf458a4ef31b.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/keyword.asciidoc:249 +// mapping/types/keyword.asciidoc:260 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "kwd": { "type": "keyword", diff --git a/docs/examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc b/docs/examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc index b3dcd8bc1..b0675f45b 100644 --- a/docs/examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc +++ b/docs/examples/01b23f09d2b7f140faf649eadbbf3ac3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/index-templates.asciidoc:83 +// indices/index-templates.asciidoc:84 [source, python] ---- diff --git a/docs/examples/01cd0ea360282a2c591a366679d7187d.asciidoc b/docs/examples/01cd0ea360282a2c591a366679d7187d.asciidoc new file mode 100644 index 000000000..79f5d0185 --- /dev/null +++ b/docs/examples/01cd0ea360282a2c591a366679d7187d.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// troubleshooting/common-issues/task-queue-backlog.asciidoc:60 + +[source, python] +---- +resp = client.tasks.list( + human=True, + detailed=True, + actions="indices:data/write/bulk", +) +print(resp) +---- diff --git a/docs/examples/03891265df2111a38e0b6b24c1b967e1.asciidoc b/docs/examples/03891265df2111a38e0b6b24c1b967e1.asciidoc index f46691025..4c265f7ad 100644 --- a/docs/examples/03891265df2111a38e0b6b24c1b967e1.asciidoc +++ b/docs/examples/03891265df2111a38e0b6b24c1b967e1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/security/get-service-accounts.asciidoc:267 +// rest-api/security/get-service-accounts.asciidoc:299 [source, python] ---- diff --git a/docs/examples/04412d11783dac25b5fd2ec5407078a3.asciidoc b/docs/examples/04412d11783dac25b5fd2ec5407078a3.asciidoc index 639dc270c..223f90baf 100644 --- a/docs/examples/04412d11783dac25b5fd2ec5407078a3.asciidoc +++ b/docs/examples/04412d11783dac25b5fd2ec5407078a3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-api-key-id-api.asciidoc:86 +// connector/apis/update-connector-api-key-id-api.asciidoc:87 [source, python] ---- diff --git a/docs/examples/046b2249bbc49e77848c114cee940f17.asciidoc b/docs/examples/046b2249bbc49e77848c114cee940f17.asciidoc index 0289db8e2..4a3b96176 100644 --- a/docs/examples/046b2249bbc49e77848c114cee940f17.asciidoc +++ b/docs/examples/046b2249bbc49e77848c114cee940f17.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/text-expansion-query.asciidoc:157 +// query-dsl/text-expansion-query.asciidoc:164 [source, python] ---- diff --git a/docs/examples/04de2e3a9c00c2056b07bf9cf9e63a99.asciidoc b/docs/examples/04de2e3a9c00c2056b07bf9cf9e63a99.asciidoc index 078edad78..9e4fffd1f 100644 --- a/docs/examples/04de2e3a9c00c2056b07bf9cf9e63a99.asciidoc +++ b/docs/examples/04de2e3a9c00c2056b07bf9cf9e63a99.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-google-vertex-ai.asciidoc:107 +// inference/service-google-vertex-ai.asciidoc:127 [source, python] ---- diff --git a/docs/examples/9868ce609f4450702934fcbf4c340bf1.asciidoc b/docs/examples/05e637284bc3bedd46e0b7c26ad983c4.asciidoc similarity index 90% rename from docs/examples/9868ce609f4450702934fcbf4c340bf1.asciidoc rename to docs/examples/05e637284bc3bedd46e0b7c26ad983c4.asciidoc index af6cc83ab..cea3d0eb3 100644 --- a/docs/examples/9868ce609f4450702934fcbf4c340bf1.asciidoc +++ b/docs/examples/05e637284bc3bedd46e0b7c26ad983c4.asciidoc @@ -4,7 +4,7 @@ [source, python] ---- resp = client.ingest.put_pipeline( - id="alibabacloud_ai_search_embeddings", + id="alibabacloud_ai_search_embeddings_pipeline", processors=[ { "inference": { diff --git a/docs/examples/611c1e05f4ebb48a1a8c8488238ce34d.asciidoc b/docs/examples/0709a38613d2de90d418ce12b36af30e.asciidoc similarity index 74% rename from docs/examples/611c1e05f4ebb48a1a8c8488238ce34d.asciidoc rename to docs/examples/0709a38613d2de90d418ce12b36af30e.asciidoc index c03987dcd..719d89389 100644 --- a/docs/examples/611c1e05f4ebb48a1a8c8488238ce34d.asciidoc +++ b/docs/examples/0709a38613d2de90d418ce12b36af30e.asciidoc @@ -3,8 +3,6 @@ [source, python] ---- -resp = client.cluster.reroute( - metric="none", -) +resp = client.cluster.reroute() print(resp) ---- diff --git a/docs/examples/0737ebaea33631f001fb3f4226948492.asciidoc b/docs/examples/0737ebaea33631f001fb3f4226948492.asciidoc index 7f7af688a..8b47a2a5b 100644 --- a/docs/examples/0737ebaea33631f001fb3f4226948492.asciidoc +++ b/docs/examples/0737ebaea33631f001fb3f4226948492.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/geoip.asciidoc:235 +// ingest/processors/geoip.asciidoc:237 [source, python] ---- diff --git a/docs/examples/840f8c863c30b04abcf2dd66b846f157.asciidoc b/docs/examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc similarity index 86% rename from docs/examples/840f8c863c30b04abcf2dd66b846f157.asciidoc rename to docs/examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc index 2ab4931b0..1407a4b6c 100644 --- a/docs/examples/840f8c863c30b04abcf2dd66b846f157.asciidoc +++ b/docs/examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-elasticsearch.asciidoc:172 +// inference/service-elasticsearch.asciidoc:223 [source, python] ---- @@ -14,6 +14,7 @@ resp = client.inference.put( "min_number_of_allocations": 3, "max_number_of_allocations": 10 }, + "num_threads": 1, "model_id": ".multilingual-e5-small" } }, diff --git a/docs/examples/095e3f21941a9cc75f398389a075152d.asciidoc b/docs/examples/095e3f21941a9cc75f398389a075152d.asciidoc index 01469ab8e..00532f55c 100644 --- a/docs/examples/095e3f21941a9cc75f398389a075152d.asciidoc +++ b/docs/examples/095e3f21941a9cc75f398389a075152d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ml/trained-models/apis/infer-trained-model.asciidoc:1043 +// ml/trained-models/apis/infer-trained-model.asciidoc:1144 [source, python] ---- diff --git a/docs/examples/09769561f082b50558fb7d8707719963.asciidoc b/docs/examples/09769561f082b50558fb7d8707719963.asciidoc index 9eb29e774..9aa9cba6e 100644 --- a/docs/examples/09769561f082b50558fb7d8707719963.asciidoc +++ b/docs/examples/09769561f082b50558fb7d8707719963.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/nodes-stats.asciidoc:2578 +// cluster/nodes-stats.asciidoc:2582 [source, python] ---- diff --git a/docs/examples/09cb1b18bf4033b4afafb25bd3dab12c.asciidoc b/docs/examples/09cb1b18bf4033b4afafb25bd3dab12c.asciidoc index 6e910f0cc..7ed47659e 100644 --- a/docs/examples/09cb1b18bf4033b4afafb25bd3dab12c.asciidoc +++ b/docs/examples/09cb1b18bf4033b4afafb25bd3dab12c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/rule-query.asciidoc:65 +// query-dsl/rule-query.asciidoc:71 [source, python] ---- diff --git a/docs/examples/0a650401134f07e40216f0d0d1a66a32.asciidoc b/docs/examples/0a650401134f07e40216f0d0d1a66a32.asciidoc index e9aa27856..c9a221494 100644 --- a/docs/examples/0a650401134f07e40216f0d0d1a66a32.asciidoc +++ b/docs/examples/0a650401134f07e40216f0d0d1a66a32.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cat/allocation.asciidoc:119 +// cat/allocation.asciidoc:120 [source, python] ---- diff --git a/docs/examples/0ad8edd10542ec2c4d5d8700d7e2ba97.asciidoc b/docs/examples/0ad8edd10542ec2c4d5d8700d7e2ba97.asciidoc index 25df3cdc2..0941c559f 100644 --- a/docs/examples/0ad8edd10542ec2c4d5d8700d7e2ba97.asciidoc +++ b/docs/examples/0ad8edd10542ec2c4d5d8700d7e2ba97.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-amazon-bedrock.asciidoc:136 +// inference/service-amazon-bedrock.asciidoc:156 [source, python] ---- diff --git a/docs/examples/0ade87c8cb0e3c188d2e3dce279d5cc2.asciidoc b/docs/examples/0ade87c8cb0e3c188d2e3dce279d5cc2.asciidoc index bf81f55e9..d92db47de 100644 --- a/docs/examples/0ade87c8cb0e3c188d2e3dce279d5cc2.asciidoc +++ b/docs/examples/0ade87c8cb0e3c188d2e3dce279d5cc2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-filtering-api.asciidoc:115 +// connector/apis/update-connector-filtering-api.asciidoc:116 [source, python] ---- diff --git a/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc b/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc new file mode 100644 index 000000000..3e564fc3a --- /dev/null +++ b/docs/examples/0bee07a581c5776e068f6f4efad5a399.asciidoc @@ -0,0 +1,14 @@ +// This file is autogenerated, DO NOT EDIT +// esql/esql-across-clusters.asciidoc:197 + +[source, python] +---- +resp = client.esql.async_query( + format="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 + }, +) +print(resp) +---- diff --git a/docs/examples/0c2ca704a39dda8b3a7c5806ec6c6cf8.asciidoc b/docs/examples/0c2ca704a39dda8b3a7c5806ec6c6cf8.asciidoc index c2f9ea70e..e9e7a172a 100644 --- a/docs/examples/0c2ca704a39dda8b3a7c5806ec6c6cf8.asciidoc +++ b/docs/examples/0c2ca704a39dda8b3a7c5806ec6c6cf8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1379 +// mapping/runtime.asciidoc:1377 [source, python] ---- diff --git a/docs/examples/0c2d9ac7e3f28d4d802e21cbbbcfeb34.asciidoc b/docs/examples/0c2d9ac7e3f28d4d802e21cbbbcfeb34.asciidoc index 110616292..0a3e4fe55 100644 --- a/docs/examples/0c2d9ac7e3f28d4d802e21cbbbcfeb34.asciidoc +++ b/docs/examples/0c2d9ac7e3f28d4d802e21cbbbcfeb34.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cat/recovery.asciidoc:113 +// cat/recovery.asciidoc:112 [source, python] ---- diff --git a/docs/examples/0c8be7aec84ea86b243904f5d4162f5a.asciidoc b/docs/examples/0c8be7aec84ea86b243904f5d4162f5a.asciidoc new file mode 100644 index 000000000..455b6a220 --- /dev/null +++ b/docs/examples/0c8be7aec84ea86b243904f5d4162f5a.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:292 + +[source, python] +---- +resp = client.search( + index="cooking_blog", + query={ + "match": { + "title": { + "query": "fluffy pancakes breakfast", + "minimum_should_match": 2 + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc b/docs/examples/0d30077cd34e93377a3a86f2ebd69415.asciidoc similarity index 80% rename from docs/examples/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc rename to docs/examples/0d30077cd34e93377a3a86f2ebd69415.asciidoc index bb8f5780c..1d9eb5f3c 100644 --- a/docs/examples/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc +++ b/docs/examples/0d30077cd34e93377a3a86f2ebd69415.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/create-connector-api.asciidoc:111 +// connector/apis/create-connector-api.asciidoc:112 [source, python] ---- @@ -9,7 +9,7 @@ resp = client.connector.put( name="My Connector", description="My Connector to sync data to Elastic index from Google Drive", service_type="google_drive", - language="english", + language="en", ) print(resp) ---- diff --git a/docs/examples/0d8063b484a18f8672fb5ed8712c5c97.asciidoc b/docs/examples/0d8063b484a18f8672fb5ed8712c5c97.asciidoc index dd88587e1..a0fcce54b 100644 --- a/docs/examples/0d8063b484a18f8672fb5ed8712c5c97.asciidoc +++ b/docs/examples/0d8063b484a18f8672fb5ed8712c5c97.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-index-template.asciidoc:296 +// indices/put-index-template.asciidoc:299 [source, python] ---- diff --git a/docs/examples/0e31b8ad176b31028becf9500989bcbd.asciidoc b/docs/examples/0e31b8ad176b31028becf9500989bcbd.asciidoc new file mode 100644 index 000000000..5965ade94 --- /dev/null +++ b/docs/examples/0e31b8ad176b31028becf9500989bcbd.asciidoc @@ -0,0 +1,21 @@ +// This file is autogenerated, DO NOT EDIT +// inference/service-watsonx-ai.asciidoc:96 + +[source, python] +---- +resp = client.inference.put( + task_type="text_embedding", + inference_id="watsonx-embeddings", + inference_config={ + "service": "watsonxai", + "service_settings": { + "api_key": "", + "url": "", + "model_id": "ibm/slate-30m-english-rtrvr", + "project_id": "", + "api_version": "2024-03-14" + } + }, +) +print(resp) +---- diff --git a/docs/examples/0eccea755bd4f6dd47579a9022690546.asciidoc b/docs/examples/0eccea755bd4f6dd47579a9022690546.asciidoc index d5e443e7e..5325fc189 100644 --- a/docs/examples/0eccea755bd4f6dd47579a9022690546.asciidoc +++ b/docs/examples/0eccea755bd4f6dd47579a9022690546.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// modules/cluster/remote-clusters-migration.asciidoc:132 +// modules/cluster/remote-clusters-migration.asciidoc:133 [source, python] ---- diff --git a/docs/examples/103296e16b4233926ad1f07360385606.asciidoc b/docs/examples/103296e16b4233926ad1f07360385606.asciidoc index 8becee40d..311b42d6c 100644 --- a/docs/examples/103296e16b4233926ad1f07360385606.asciidoc +++ b/docs/examples/103296e16b4233926ad1f07360385606.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/analyzers/lang-analyzer.asciidoc:1793 +// analysis/analyzers/lang-analyzer.asciidoc:1794 [source, python] ---- diff --git a/docs/examples/11be807bdeaeecc8174dec88e0851ea7.asciidoc b/docs/examples/11be807bdeaeecc8174dec88e0851ea7.asciidoc new file mode 100644 index 000000000..409af45c2 --- /dev/null +++ b/docs/examples/11be807bdeaeecc8174dec88e0851ea7.asciidoc @@ -0,0 +1,15 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-API-tutorial.asciidoc:437 + +[source, python] +---- +resp = client.perform_request( + "GET", + "/_connector/_sync_job", + params={ + "connector_id": "my-connector-id", + "size": "1" + }, +) +print(resp) +---- diff --git a/docs/examples/1295f51b9e5d4ba9987b02478146b50b.asciidoc b/docs/examples/1295f51b9e5d4ba9987b02478146b50b.asciidoc index 8f63108f6..69cab898b 100644 --- a/docs/examples/1295f51b9e5d4ba9987b02478146b50b.asciidoc +++ b/docs/examples/1295f51b9e5d4ba9987b02478146b50b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/high-jvm-memory-pressure.asciidoc:70 +// troubleshooting/common-issues/high-jvm-memory-pressure.asciidoc:72 [source, python] ---- diff --git a/docs/examples/12e9e758f7f18a6cbf27e9d0aea57a19.asciidoc b/docs/examples/12e9e758f7f18a6cbf27e9d0aea57a19.asciidoc new file mode 100644 index 000000000..19be5e48e --- /dev/null +++ b/docs/examples/12e9e758f7f18a6cbf27e9d0aea57a19.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-managed-service.asciidoc:167 + +[source, python] +---- +resp = client.update( + index=".elastic-connectors", + id="connector_id", + doc={ + "features": { + "native_connector_api_keys": { + "enabled": True + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/13ecdf99114098c76b050397d9c3d4e6.asciidoc b/docs/examples/13ecdf99114098c76b050397d9c3d4e6.asciidoc index fa54e865d..67a855b1c 100644 --- a/docs/examples/13ecdf99114098c76b050397d9c3d4e6.asciidoc +++ b/docs/examples/13ecdf99114098c76b050397d9c3d4e6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/post-inference.asciidoc:201 +// inference/post-inference.asciidoc:196 [source, python] ---- diff --git a/docs/examples/146bd22fd0e7be2345619e8f11d3a4cb.asciidoc b/docs/examples/146bd22fd0e7be2345619e8f11d3a4cb.asciidoc index e1ecfa48c..4e1e563b6 100644 --- a/docs/examples/146bd22fd0e7be2345619e8f11d3a4cb.asciidoc +++ b/docs/examples/146bd22fd0e7be2345619e8f11d3a4cb.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/hotspotting.asciidoc:247 +// troubleshooting/common-issues/hotspotting.asciidoc:249 [source, python] ---- diff --git a/docs/examples/150b5fee5678bf8cdf0932da73eada80.asciidoc b/docs/examples/150b5fee5678bf8cdf0932da73eada80.asciidoc index fb07636cc..f5004f878 100644 --- a/docs/examples/150b5fee5678bf8cdf0932da73eada80.asciidoc +++ b/docs/examples/150b5fee5678bf8cdf0932da73eada80.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/nodes-stats.asciidoc:2546 +// cluster/nodes-stats.asciidoc:2550 [source, python] ---- diff --git a/docs/examples/1522a9297151d7046e6345b9b27539ca.asciidoc b/docs/examples/1522a9297151d7046e6345b9b27539ca.asciidoc new file mode 100644 index 000000000..1b3b7fee7 --- /dev/null +++ b/docs/examples/1522a9297151d7046e6345b9b27539ca.asciidoc @@ -0,0 +1,19 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-API-tutorial.asciidoc:340 + +[source, python] +---- +resp = client.connector.update_configuration( + connector_id="my-connector-id", + values={ + "host": "127.0.0.1", + "port": 5432, + "username": "myuser", + "password": "mypassword", + "database": "chinook", + "schema": "public", + "tables": "album,artist" + }, +) +print(resp) +---- diff --git a/docs/examples/1570976f7807b88dc8a046b833be057b.asciidoc b/docs/examples/1570976f7807b88dc8a046b833be057b.asciidoc index b5ec59379..293680f4f 100644 --- a/docs/examples/1570976f7807b88dc8a046b833be057b.asciidoc +++ b/docs/examples/1570976f7807b88dc8a046b833be057b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/hotspotting.asciidoc:28 +// troubleshooting/common-issues/hotspotting.asciidoc:30 [source, python] ---- diff --git a/docs/examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc b/docs/examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc new file mode 100644 index 000000000..9478424ba --- /dev/null +++ b/docs/examples/15f769bbd7b5fddeb3353ae726b71b14.asciidoc @@ -0,0 +1,64 @@ +// This file is autogenerated, DO NOT EDIT +// vectors/vector-functions.asciidoc:401 + +[source, python] +---- +resp = client.search( + index="my-index-bit-vectors", + query={ + "script_score": { + "query": { + "match_all": {} + }, + "script": { + "source": "dotProduct(params.query_vector, 'my_dense_vector')", + "params": { + "query_vector": [ + 0.23, + 1.45, + 3.67, + 4.89, + -0.56, + 2.34, + 3.21, + 1.78, + -2.45, + 0.98, + -0.12, + 3.45, + 4.56, + 2.78, + 1.23, + 0.67, + 3.89, + 4.12, + -2.34, + 1.56, + 0.78, + 3.21, + 4.12, + 2.45, + -1.67, + 0.34, + -3.45, + 4.56, + -2.78, + 1.23, + -0.67, + 3.89, + -4.34, + 2.12, + -1.56, + 0.78, + -3.21, + 4.45, + 2.12, + 1.67 + ] + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/1637ef51d673b35cc8894ee80cd61c87.asciidoc b/docs/examples/1637ef51d673b35cc8894ee80cd61c87.asciidoc index cb4a24a1a..3701d222a 100644 --- a/docs/examples/1637ef51d673b35cc8894ee80cd61c87.asciidoc +++ b/docs/examples/1637ef51d673b35cc8894ee80cd61c87.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// tab-widgets/cpu-usage.asciidoc:14 +// troubleshooting/common-issues/high-cpu-usage.asciidoc:24 [source, python] ---- diff --git a/docs/examples/16a7ce08b4a6b3af269f27eecc71d664.asciidoc b/docs/examples/16a7ce08b4a6b3af269f27eecc71d664.asciidoc new file mode 100644 index 000000000..1e35ec0d9 --- /dev/null +++ b/docs/examples/16a7ce08b4a6b3af269f27eecc71d664.asciidoc @@ -0,0 +1,15 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/getting-started.asciidoc:546 + +[source, python] +---- +resp = client.indices.delete( + index="books", +) +print(resp) + +resp1 = client.indices.delete( + index="my-explicit-mappings-books", +) +print(resp1) +---- diff --git a/docs/examples/17316a81c9dbdd120b7754116bf0461c.asciidoc b/docs/examples/17316a81c9dbdd120b7754116bf0461c.asciidoc new file mode 100644 index 000000000..cd2b37009 --- /dev/null +++ b/docs/examples/17316a81c9dbdd120b7754116bf0461c.asciidoc @@ -0,0 +1,31 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/_connectors-create-native-api-key.asciidoc:12 + +[source, python] +---- +resp = client.security.create_api_key( + name="my-connector-api-key", + role_descriptors={ + "my-connector-connector-role": { + "cluster": [ + "monitor", + "manage_connector" + ], + "indices": [ + { + "names": [ + "my-index_name", + ".search-acl-filter-my-index_name", + ".elastic-connectors*" + ], + "privileges": [ + "all" + ], + "allow_restricted_indices": False + } + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/1745ac9e6d22a2ffe7ac381f9ba238f9.asciidoc b/docs/examples/1745ac9e6d22a2ffe7ac381f9ba238f9.asciidoc deleted file mode 100644 index 3b131eced..000000000 --- a/docs/examples/1745ac9e6d22a2ffe7ac381f9ba238f9.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/high-cpu-usage.asciidoc:26 - -[source, python] ----- -resp = client.nodes.hot_threads( - node_id="my-node,my-other-node", -) -print(resp) ----- diff --git a/docs/examples/182df084f028479ecbe8d7648ddad892.asciidoc b/docs/examples/182df084f028479ecbe8d7648ddad892.asciidoc index 7a7bde5c4..d6f5ea695 100644 --- a/docs/examples/182df084f028479ecbe8d7648ddad892.asciidoc +++ b/docs/examples/182df084f028479ecbe8d7648ddad892.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ilm/apis/get-status.asciidoc:60 +// tab-widgets/troubleshooting/data/start-ilm.asciidoc:84 [source, python] ---- diff --git a/docs/examples/18de6782bd18f4a9baec2feec8c02a8b.asciidoc b/docs/examples/18de6782bd18f4a9baec2feec8c02a8b.asciidoc deleted file mode 100644 index 999873e69..000000000 --- a/docs/examples/18de6782bd18f4a9baec2feec8c02a8b.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// migration/migrate_8_0/migrate_to_java_time.asciidoc:268 - -[source, python] ----- -resp = client.indices.create( - index="my-index-000002", - mappings={ - "properties": { - "datetime": { - "type": "date", - "format": "uuuu/MM/dd HH:mm:ss||uuuu/MM/dd||epoch_millis" - } - } - }, -) -print(resp) ----- diff --git a/docs/examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc b/docs/examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc new file mode 100644 index 000000000..157634563 --- /dev/null +++ b/docs/examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc @@ -0,0 +1,58 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:521 + +[source, python] +---- +resp = client.search( + index="cooking_blog", + query={ + "bool": { + "must": [ + { + "term": { + "category.keyword": "Main Course" + } + }, + { + "term": { + "tags": "vegetarian" + } + }, + { + "range": { + "rating": { + "gte": 4.5 + } + } + } + ], + "should": [ + { + "multi_match": { + "query": "curry spicy", + "fields": [ + "title^2", + "description" + ] + } + }, + { + "range": { + "date": { + "gte": "now-1M/d" + } + } + } + ], + "must_not": [ + { + "term": { + "category.keyword": "Dessert" + } + } + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/192fa1f6f51dfb640e9e15bb5cd7eebc.asciidoc b/docs/examples/192fa1f6f51dfb640e9e15bb5cd7eebc.asciidoc index e33ee65ec..16e0c0f3b 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:144 +// ilm/error-handling.asciidoc:147 [source, python] ---- diff --git a/docs/examples/193704020a19714dec390452a4e75e8d.asciidoc b/docs/examples/193704020a19714dec390452a4e75e8d.asciidoc new file mode 100644 index 000000000..dc757c835 --- /dev/null +++ b/docs/examples/193704020a19714dec390452a4e75e8d.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/getting-started.asciidoc:54 + +[source, python] +---- +resp = client.indices.create( + index="books", +) +print(resp) +---- diff --git a/docs/examples/194bbac15e709174ac85b681f3a3d137.asciidoc b/docs/examples/194bbac15e709174ac85b681f3a3d137.asciidoc index e1a1a265e..9ace291db 100644 --- a/docs/examples/194bbac15e709174ac85b681f3a3d137.asciidoc +++ b/docs/examples/194bbac15e709174ac85b681f3a3d137.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-index-template.asciidoc:186 +// indices/put-index-template.asciidoc:189 [source, python] ---- diff --git a/docs/examples/196aed02b11def364bab84e455c1a073.asciidoc b/docs/examples/196aed02b11def364bab84e455c1a073.asciidoc index 4b37db9ca..8eeb99faf 100644 --- a/docs/examples/196aed02b11def364bab84e455c1a073.asciidoc +++ b/docs/examples/196aed02b11def364bab84e455c1a073.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-index-template.asciidoc:324 +// indices/put-index-template.asciidoc:327 [source, python] ---- diff --git a/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc b/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc index b41aa69e7..565dfeef0 100644 --- a/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc +++ b/docs/examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/apis/simulate-ingest.asciidoc:205 +// ingest/apis/simulate-ingest.asciidoc:273 [source, python] ---- diff --git a/docs/examples/19d60e4890cc57151d596326484d9076.asciidoc b/docs/examples/19d60e4890cc57151d596326484d9076.asciidoc deleted file mode 100644 index 62e24dbbd..000000000 --- a/docs/examples/19d60e4890cc57151d596326484d9076.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// ingest/apis/delete-geoip-database.asciidoc:10 - -[source, python] ----- -resp = client.perform_request( - "DELETE", - "/_ingest/geoip/database/my-database-id", -) -print(resp) ----- diff --git a/docs/examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc b/docs/examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc index 3846208d6..0b123e38b 100644 --- a/docs/examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc +++ b/docs/examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/semantic-text.asciidoc:22 +// mapping/types/semantic-text.asciidoc:21 [source, python] ---- diff --git a/docs/examples/1a3897cfb4f974c09d0d847baac8aa6d.asciidoc b/docs/examples/1a3897cfb4f974c09d0d847baac8aa6d.asciidoc index 8fdcf6d8a..3935ff8bc 100644 --- a/docs/examples/1a3897cfb4f974c09d0d847baac8aa6d.asciidoc +++ b/docs/examples/1a3897cfb4f974c09d0d847baac8aa6d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/hotspotting.asciidoc:190 +// troubleshooting/common-issues/hotspotting.asciidoc:192 [source, python] ---- diff --git a/docs/examples/1a56df055b94466ca76818e0858752c6.asciidoc b/docs/examples/1a56df055b94466ca76818e0858752c6.asciidoc index e45764af1..d861ad7b6 100644 --- a/docs/examples/1a56df055b94466ca76818e0858752c6.asciidoc +++ b/docs/examples/1a56df055b94466ca76818e0858752c6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// tab-widgets/inference-api/infer-api-task.asciidoc:89 +// tab-widgets/inference-api/infer-api-task.asciidoc:97 [source, python] ---- diff --git a/docs/examples/1a7483796087053ba55029d0dc2ab356.asciidoc b/docs/examples/1a7483796087053ba55029d0dc2ab356.asciidoc new file mode 100644 index 000000000..cd3f38242 --- /dev/null +++ b/docs/examples/1a7483796087053ba55029d0dc2ab356.asciidoc @@ -0,0 +1,23 @@ +// This file is autogenerated, DO NOT EDIT +// esql/multivalued-fields.asciidoc:187 + +[source, python] +---- +resp = client.index( + index="mv", + refresh=True, + document={ + "a": [ + 2, + None, + 1 + ] + }, +) +print(resp) + +resp1 = client.esql.query( + query="FROM mv | LIMIT 1", +) +print(resp1) +---- diff --git a/docs/examples/1a9e03ce0355872a7db27fedc783fbec.asciidoc b/docs/examples/1a9e03ce0355872a7db27fedc783fbec.asciidoc index e0431da95..c5c8f0d23 100644 --- a/docs/examples/1a9e03ce0355872a7db27fedc783fbec.asciidoc +++ b/docs/examples/1a9e03ce0355872a7db27fedc783fbec.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-google-vertex-ai.asciidoc:125 +// inference/service-google-vertex-ai.asciidoc:145 [source, python] ---- diff --git a/docs/examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc b/docs/examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc index f2acde7ac..6ae6ba615 100644 --- a/docs/examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc +++ b/docs/examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/params/subobjects.asciidoc:130 +// mapping/params/subobjects.asciidoc:131 [source, python] ---- diff --git a/docs/examples/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc b/docs/examples/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc index 827fafa03..6e8bc60ae 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:15 +// ilm/error-handling.asciidoc:18 [source, python] ---- diff --git a/docs/examples/1ba7afe23a26fe9ac7856d8c5bc1059d.asciidoc b/docs/examples/1ba7afe23a26fe9ac7856d8c5bc1059d.asciidoc index dc02df84d..67df96154 100644 --- a/docs/examples/1ba7afe23a26fe9ac7856d8c5bc1059d.asciidoc +++ b/docs/examples/1ba7afe23a26fe9ac7856d8c5bc1059d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/analyzers/lang-analyzer.asciidoc:1501 +// analysis/analyzers/lang-analyzer.asciidoc:1502 [source, python] ---- diff --git a/docs/examples/be30ea12f605fd61acba689b68e00bbe.asciidoc b/docs/examples/1c330f0fc9eac19d0edeb8c4017b9b93.asciidoc similarity index 91% rename from docs/examples/be30ea12f605fd61acba689b68e00bbe.asciidoc rename to docs/examples/1c330f0fc9eac19d0edeb8c4017b9b93.asciidoc index 936d4c7a2..e222ea879 100644 --- a/docs/examples/be30ea12f605fd61acba689b68e00bbe.asciidoc +++ b/docs/examples/1c330f0fc9eac19d0edeb8c4017b9b93.asciidoc @@ -4,7 +4,7 @@ [source, python] ---- resp = client.ingest.put_pipeline( - id="hugging_face_embeddings", + id="hugging_face_embeddings_pipeline", processors=[ { "inference": { diff --git a/docs/examples/1c9dac4183a3532c91dbd1a46907729b.asciidoc b/docs/examples/1c9dac4183a3532c91dbd1a46907729b.asciidoc new file mode 100644 index 000000000..08cabd096 --- /dev/null +++ b/docs/examples/1c9dac4183a3532c91dbd1a46907729b.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-API-tutorial.asciidoc:459 + +[source, python] +---- +resp = client.indices.delete( + index="music", +) +print(resp) +---- diff --git a/docs/examples/7c63a1d2fbec5283e913ff39fafd0604.asciidoc b/docs/examples/1cbecd19be22979aefb45b4f160e77ea.asciidoc similarity index 91% rename from docs/examples/7c63a1d2fbec5283e913ff39fafd0604.asciidoc rename to docs/examples/1cbecd19be22979aefb45b4f160e77ea.asciidoc index 8bcc50f7f..7a1d92818 100644 --- a/docs/examples/7c63a1d2fbec5283e913ff39fafd0604.asciidoc +++ b/docs/examples/1cbecd19be22979aefb45b4f160e77ea.asciidoc @@ -4,7 +4,7 @@ [source, python] ---- resp = client.ingest.put_pipeline( - id="google_vertex_ai_embeddings", + id="google_vertex_ai_embeddings_pipeline", processors=[ { "inference": { diff --git a/docs/examples/1d918e206ad8dab916e59183da24d9ec.asciidoc b/docs/examples/1d918e206ad8dab916e59183da24d9ec.asciidoc deleted file mode 100644 index 236c5a03f..000000000 --- a/docs/examples/1d918e206ad8dab916e59183da24d9ec.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// watcher/how-watcher-works.asciidoc:156 - -[source, python] ----- -resp = client.indices.put_settings( - index=".watches", - settings={ - "index.routing.allocation.include.role": "watcher" - }, -) -print(resp) ----- diff --git a/docs/examples/1dadb7efe27b6c0c231eb6535e413bd9.asciidoc b/docs/examples/1dadb7efe27b6c0c231eb6535e413bd9.asciidoc index 78c452868..631cc34b0 100644 --- a/docs/examples/1dadb7efe27b6c0c231eb6535e413bd9.asciidoc +++ b/docs/examples/1dadb7efe27b6c0c231eb6535e413bd9.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-azure-ai-studio.asciidoc:142 +// inference/service-azure-ai-studio.asciidoc:162 [source, python] ---- diff --git a/docs/examples/1e0b85750d4e63ebbc927d4627c44bf8.asciidoc b/docs/examples/1e0b85750d4e63ebbc927d4627c44bf8.asciidoc index 7083e786e..b4d009c90 100644 --- a/docs/examples/1e0b85750d4e63ebbc927d4627c44bf8.asciidoc +++ b/docs/examples/1e0b85750d4e63ebbc927d4627c44bf8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:601 +// how-to/size-your-shards.asciidoc:604 [source, python] ---- diff --git a/docs/examples/1e26353d546d733634187b8c3a7837a7.asciidoc b/docs/examples/1e26353d546d733634187b8c3a7837a7.asciidoc index 588151968..e5f2463f7 100644 --- a/docs/examples/1e26353d546d733634187b8c3a7837a7.asciidoc +++ b/docs/examples/1e26353d546d733634187b8c3a7837a7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/list-connectors-api.asciidoc:100 +// connector/apis/list-connectors-api.asciidoc:101 [source, python] ---- diff --git a/docs/examples/1e547696f54582840040b1aa6661760c.asciidoc b/docs/examples/1e547696f54582840040b1aa6661760c.asciidoc index 3166b147c..ef5d0cf52 100644 --- a/docs/examples/1e547696f54582840040b1aa6661760c.asciidoc +++ b/docs/examples/1e547696f54582840040b1aa6661760c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/rollover-index.asciidoc:226 +// tab-widgets/troubleshooting/data/restore-from-snapshot.asciidoc:400 [source, python] ---- diff --git a/docs/examples/1fb2c77c0988bc6545040b20e3afa7e9.asciidoc b/docs/examples/1fb2c77c0988bc6545040b20e3afa7e9.asciidoc new file mode 100644 index 000000000..14366fbc8 --- /dev/null +++ b/docs/examples/1fb2c77c0988bc6545040b20e3afa7e9.asciidoc @@ -0,0 +1,41 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/dls-e2e-guide.asciidoc:139 + +[source, python] +---- +resp = client.security.create_api_key( + name="john-api-key", + expiration="1d", + role_descriptors={ + "sharepoint-online-role": { + "index": [ + { + "names": [ + "sharepoint-search-application" + ], + "privileges": [ + "read" + ], + "query": { + "template": { + "params": { + "access_control": [ + "john@example.co", + "Engineering Members" + ] + }, + "source": "\n {\n \"bool\": {\n \"should\": [\n {\n \"bool\": {\n \"must_not\": {\n \"exists\": {\n \"field\": \"_allow_access_control\"\n }\n }\n }\n },\n {\n \"terms\": {\n \"_allow_access_control.enum\": {{#toJson}}access_control{{/toJson}}\n }\n }\n ]\n }\n }\n " + } + } + } + ], + "restriction": { + "workflows": [ + "search_application_query" + ] + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/2155c920d7d860f3ee7542f2211b4fec.asciidoc b/docs/examples/2155c920d7d860f3ee7542f2211b4fec.asciidoc index d478f5eb2..b4c25f594 100644 --- a/docs/examples/2155c920d7d860f3ee7542f2211b4fec.asciidoc +++ b/docs/examples/2155c920d7d860f3ee7542f2211b4fec.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/text-expansion-query.asciidoc:18 +// query-dsl/text-expansion-query.asciidoc:25 [source, python] ---- diff --git a/docs/examples/3fab530a2e43807929c0ef3ebf7d268c.asciidoc b/docs/examples/216e24f05cbb82c1718713fbab8623d2.asciidoc similarity index 87% rename from docs/examples/3fab530a2e43807929c0ef3ebf7d268c.asciidoc rename to docs/examples/216e24f05cbb82c1718713fbab8623d2.asciidoc index 1d8590c21..9ddf0fe44 100644 --- a/docs/examples/3fab530a2e43807929c0ef3ebf7d268c.asciidoc +++ b/docs/examples/216e24f05cbb82c1718713fbab8623d2.asciidoc @@ -1,11 +1,11 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/geoip.asciidoc:134 +// ingest/processors/geoip.asciidoc:136 [source, python] ---- resp = client.ingest.put_pipeline( id="geoip", - description="Add geoip info", + description="Add ip geolocation info", processors=[ { "geoip": { diff --git a/docs/examples/21cd01cb90d3ea1acd0ab22d7edd2c88.asciidoc b/docs/examples/21cd01cb90d3ea1acd0ab22d7edd2c88.asciidoc index 00a052e0f..23c92bf91 100644 --- a/docs/examples/21cd01cb90d3ea1acd0ab22d7edd2c88.asciidoc +++ b/docs/examples/21cd01cb90d3ea1acd0ab22d7edd2c88.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// tab-widgets/inference-api/infer-api-task.asciidoc:154 +// tab-widgets/inference-api/infer-api-task.asciidoc:162 [source, python] ---- diff --git a/docs/examples/983a867c90e63e070518f2f709f659ee.asciidoc b/docs/examples/21d41e8cbd107fbdf0901f885834dafc.asciidoc similarity index 67% rename from docs/examples/983a867c90e63e070518f2f709f659ee.asciidoc rename to docs/examples/21d41e8cbd107fbdf0901f885834dafc.asciidoc index 23a1b1dd5..4ce3834f3 100644 --- a/docs/examples/983a867c90e63e070518f2f709f659ee.asciidoc +++ b/docs/examples/21d41e8cbd107fbdf0901f885834dafc.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/wildcard.asciidoc:141 +// mapping/types/wildcard.asciidoc:139 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "card": { "type": "wildcard" diff --git a/docs/examples/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc b/docs/examples/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc index 79f87f9cc..0e4c70c10 100644 --- a/docs/examples/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc +++ b/docs/examples/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/text-expansion-query.asciidoc:93 +// query-dsl/text-expansion-query.asciidoc:100 [source, python] ---- diff --git a/docs/examples/25cb9e1da00dfd971065ce182467434d.asciidoc b/docs/examples/25cb9e1da00dfd971065ce182467434d.asciidoc index 4a396c3df..4b3a463ba 100644 --- a/docs/examples/25cb9e1da00dfd971065ce182467434d.asciidoc +++ b/docs/examples/25cb9e1da00dfd971065ce182467434d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/voting-exclusions.asciidoc:112 +// cluster/voting-exclusions.asciidoc:116 [source, python] ---- diff --git a/docs/examples/2646710ece0c4c843aebeacd370d0396.asciidoc b/docs/examples/2646710ece0c4c843aebeacd370d0396.asciidoc index 41168da02..978eb8a86 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:137 +// mapping/types/dense-vector.asciidoc:142 [source, python] ---- diff --git a/docs/examples/270549e6b062228312c4e7a54a2c2209.asciidoc b/docs/examples/270549e6b062228312c4e7a54a2c2209.asciidoc index 3fdc374f1..9ae9ebbce 100644 --- a/docs/examples/270549e6b062228312c4e7a54a2c2209.asciidoc +++ b/docs/examples/270549e6b062228312c4e7a54a2c2209.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/task-queue-backlog.asciidoc:34 +// troubleshooting/common-issues/task-queue-backlog.asciidoc:39 [source, python] ---- diff --git a/docs/examples/dfcdadcf91529d3a399e05684195028e.asciidoc b/docs/examples/2968ffb8135f77ba3a9b876dd4918119.asciidoc similarity index 85% rename from docs/examples/dfcdadcf91529d3a399e05684195028e.asciidoc rename to docs/examples/2968ffb8135f77ba3a9b876dd4918119.asciidoc index 635e058fb..67a616b10 100644 --- a/docs/examples/dfcdadcf91529d3a399e05684195028e.asciidoc +++ b/docs/examples/2968ffb8135f77ba3a9b876dd4918119.asciidoc @@ -11,7 +11,7 @@ resp = client.reindex( }, dest={ "index": "azure-ai-studio-embeddings", - "pipeline": "azure_ai_studio_embeddings" + "pipeline": "azure_ai_studio_embeddings_pipeline" }, ) print(resp) diff --git a/docs/examples/2a5f7e7d6b92c66e52616845146d2820.asciidoc b/docs/examples/2a5f7e7d6b92c66e52616845146d2820.asciidoc index 757d2d7a4..b944107e3 100644 --- a/docs/examples/2a5f7e7d6b92c66e52616845146d2820.asciidoc +++ b/docs/examples/2a5f7e7d6b92c66e52616845146d2820.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// transform/painless-examples.asciidoc:513 +// transform/painless-examples.asciidoc:522 [source, python] ---- diff --git a/docs/examples/2a71e2d7f7179dd76183d30789046808.asciidoc b/docs/examples/2a71e2d7f7179dd76183d30789046808.asciidoc index 46ca2436d..9d9d7f53e 100644 --- a/docs/examples/2a71e2d7f7179dd76183d30789046808.asciidoc +++ b/docs/examples/2a71e2d7f7179dd76183d30789046808.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:177 +// esql/multivalued-fields.asciidoc:219 [source, python] ---- diff --git a/docs/examples/2acf75803494fef29f9ca70671aa6be1.asciidoc b/docs/examples/2acf75803494fef29f9ca70671aa6be1.asciidoc index fbba69008..64607d0d5 100644 --- a/docs/examples/2acf75803494fef29f9ca70671aa6be1.asciidoc +++ b/docs/examples/2acf75803494fef29f9ca70671aa6be1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/security/bulk-delete-roles.asciidoc:95 +// rest-api/security/bulk-delete-roles.asciidoc:94 [source, python] ---- diff --git a/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc b/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc index 65c237a2b..e8b76eaa8 100644 --- a/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc +++ b/docs/examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:381 +// esql/esql-rest.asciidoc:383 [source, python] ---- diff --git a/docs/examples/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc b/docs/examples/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc index 5027a5dcb..ed97c5df2 100644 --- a/docs/examples/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc +++ b/docs/examples/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/list-connector-sync-jobs-api.asciidoc:78 +// connector/apis/list-connector-sync-jobs-api.asciidoc:79 [source, python] ---- diff --git a/docs/examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc b/docs/examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc index 64dfcb7b5..7c611874c 100644 --- a/docs/examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc +++ b/docs/examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// migration/transient-settings-migration-guide.asciidoc:64 +// migration/migrate_9_0/transient-settings-migration-guide.asciidoc:64 [source, python] ---- diff --git a/docs/examples/2c079d1ae4819a0c206b9e1aa5623523.asciidoc b/docs/examples/2c079d1ae4819a0c206b9e1aa5623523.asciidoc new file mode 100644 index 000000000..fa2d8bedb --- /dev/null +++ b/docs/examples/2c079d1ae4819a0c206b9e1aa5623523.asciidoc @@ -0,0 +1,77 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/types/passthrough.asciidoc:11 + +[source, python] +---- +resp = client.indices.create( + index="my-index-000001", + mappings={ + "properties": { + "attributes": { + "type": "passthrough", + "priority": 10, + "properties": { + "id": { + "type": "keyword" + } + } + } + } + }, +) +print(resp) + +resp1 = client.index( + index="my-index-000001", + id="1", + document={ + "attributes": { + "id": "foo", + "zone": 10 + } + }, +) +print(resp1) + +resp2 = client.search( + index="my-index-000001", + query={ + "bool": { + "must": [ + { + "match": { + "id": "foo" + } + }, + { + "match": { + "zone": 10 + } + } + ] + } + }, +) +print(resp2) + +resp3 = client.search( + index="my-index-000001", + query={ + "bool": { + "must": [ + { + "match": { + "attributes.id": "foo" + } + }, + { + "match": { + "attributes.zone": 10 + } + } + ] + } + }, +) +print(resp3) +---- diff --git a/docs/examples/2c44657adf550b8ade5cf5334106d38b.asciidoc b/docs/examples/2c44657adf550b8ade5cf5334106d38b.asciidoc index 6b4e8588e..baf7c4d24 100644 --- a/docs/examples/2c44657adf550b8ade5cf5334106d38b.asciidoc +++ b/docs/examples/2c44657adf550b8ade5cf5334106d38b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1406 +// mapping/runtime.asciidoc:1404 [source, python] ---- diff --git a/docs/examples/2c86840a46242a38cf82024a9321be46.asciidoc b/docs/examples/2c86840a46242a38cf82024a9321be46.asciidoc new file mode 100644 index 000000000..b377f60c6 --- /dev/null +++ b/docs/examples/2c86840a46242a38cf82024a9321be46.asciidoc @@ -0,0 +1,28 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/getting-started.asciidoc:362 + +[source, python] +---- +resp = client.indices.create( + index="my-explicit-mappings-books", + mappings={ + "dynamic": False, + "properties": { + "name": { + "type": "text" + }, + "author": { + "type": "text" + }, + "release_date": { + "type": "date", + "format": "yyyy-MM-dd" + }, + "page_count": { + "type": "integer" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/2d0244c020075595acb625aa5ba8f455.asciidoc b/docs/examples/2d0244c020075595acb625aa5ba8f455.asciidoc new file mode 100644 index 000000000..3b4923e2b --- /dev/null +++ b/docs/examples/2d0244c020075595acb625aa5ba8f455.asciidoc @@ -0,0 +1,38 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/fields/synthetic-source.asciidoc:260 + +[source, python] +---- +resp = client.index( + index="idx_keep", + id="1", + document={ + "path": { + "to": [ + { + "foo": [ + 3, + 2, + 1 + ] + }, + { + "foo": [ + 30, + 20, + 10 + ] + } + ], + "bar": "baz" + }, + "ids": [ + 200, + 100, + 300, + 100 + ] + }, +) +print(resp) +---- diff --git a/docs/examples/2de6885bacb8769b8f22dce253c96b0c.asciidoc b/docs/examples/2de6885bacb8769b8f22dce253c96b0c.asciidoc index 4b1cfdc52..3aa15bd1d 100644 --- a/docs/examples/2de6885bacb8769b8f22dce253c96b0c.asciidoc +++ b/docs/examples/2de6885bacb8769b8f22dce253c96b0c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/intervals-query.asciidoc:343 +// query-dsl/intervals-query.asciidoc:414 [source, python] ---- diff --git a/docs/examples/2e7844477b41fcfa9efefee4ec0e7101.asciidoc b/docs/examples/2e7844477b41fcfa9efefee4ec0e7101.asciidoc new file mode 100644 index 000000000..04f8c55ea --- /dev/null +++ b/docs/examples/2e7844477b41fcfa9efefee4ec0e7101.asciidoc @@ -0,0 +1,45 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/search-using-query-rules.asciidoc:241 + +[source, python] +---- +resp = client.search( + index="my-index-000001", + retriever={ + "rule": { + "match_criteria": { + "query_string": "puggles", + "user_country": "us" + }, + "ruleset_ids": [ + "my-ruleset" + ], + "retriever": { + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "query_string": { + "query": "pugs" + } + } + } + }, + { + "standard": { + "query": { + "query_string": { + "query": "puggles" + } + } + } + } + ] + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/2f2fd35905feef0b561c05d70c7064c1.asciidoc b/docs/examples/2f2fd35905feef0b561c05d70c7064c1.asciidoc index 98ad01d8c..d7bf20ff3 100644 --- a/docs/examples/2f2fd35905feef0b561c05d70c7064c1.asciidoc +++ b/docs/examples/2f2fd35905feef0b561c05d70c7064c1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// migration/migrate_8_0/migrate_to_java_time.asciidoc:239 +// mapping/dynamic/templates.asciidoc:570 [source, python] ---- diff --git a/docs/examples/2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc b/docs/examples/2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc deleted file mode 100644 index 00612b5df..000000000 --- a/docs/examples/2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// migration/migrate_8_0/index-setting-changes.asciidoc:48 - -[source, python] ----- -resp = client.indices.put_settings( - index="my-index-000001", - settings={ - "index.merge.policy.max_merge_at_once_explicit": None - }, -) -print(resp) ----- diff --git a/docs/examples/2f98924c3d593ea2b60edb9cef5bee22.asciidoc b/docs/examples/2f98924c3d593ea2b60edb9cef5bee22.asciidoc index 6b434ce62..e811461d4 100644 --- a/docs/examples/2f98924c3d593ea2b60edb9cef5bee22.asciidoc +++ b/docs/examples/2f98924c3d593ea2b60edb9cef5bee22.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:483 +// how-to/size-your-shards.asciidoc:484 [source, python] ---- diff --git a/docs/examples/2fa7ded8515b32f26c54394ea598f573.asciidoc b/docs/examples/2fa7ded8515b32f26c54394ea598f573.asciidoc index 4dcbb9d05..a444a667b 100644 --- a/docs/examples/2fa7ded8515b32f26c54394ea598f573.asciidoc +++ b/docs/examples/2fa7ded8515b32f26c54394ea598f573.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/index-templates.asciidoc:120 +// indices/index-templates.asciidoc:121 [source, python] ---- diff --git a/docs/examples/5f8d90515995a5eee189d722abe3b111.asciidoc b/docs/examples/310bdfb0d0d75bac7bff036a3fe51d4d.asciidoc similarity index 91% rename from docs/examples/5f8d90515995a5eee189d722abe3b111.asciidoc rename to docs/examples/310bdfb0d0d75bac7bff036a3fe51d4d.asciidoc index 42081a588..502c80666 100644 --- a/docs/examples/5f8d90515995a5eee189d722abe3b111.asciidoc +++ b/docs/examples/310bdfb0d0d75bac7bff036a3fe51d4d.asciidoc @@ -4,7 +4,7 @@ [source, python] ---- resp = client.ingest.put_pipeline( - id="azure_ai_studio_embeddings", + id="azure_ai_studio_embeddings_pipeline", processors=[ { "inference": { diff --git a/docs/examples/320645d771e952af2a67bb7445c3688d.asciidoc b/docs/examples/320645d771e952af2a67bb7445c3688d.asciidoc index f29deb5b7..4afe0c1b7 100644 --- a/docs/examples/320645d771e952af2a67bb7445c3688d.asciidoc +++ b/docs/examples/320645d771e952af2a67bb7445c3688d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/analyzers/lang-analyzer.asciidoc:1647 +// analysis/analyzers/lang-analyzer.asciidoc:1648 [source, python] ---- diff --git a/docs/examples/327466380bcd55361973b4a96c6dccb2.asciidoc b/docs/examples/327466380bcd55361973b4a96c6dccb2.asciidoc index 307952a06..4d6c43729 100644 --- a/docs/examples/327466380bcd55361973b4a96c6dccb2.asciidoc +++ b/docs/examples/327466380bcd55361973b4a96c6dccb2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/analyzers/lang-analyzer.asciidoc:1697 +// analysis/analyzers/lang-analyzer.asciidoc:1698 [source, python] ---- diff --git a/docs/examples/d3a558ef226e9dccc1c7c61e1167547f.asciidoc b/docs/examples/334811cfceb6858aeec5b3461717dd63.asciidoc similarity index 85% rename from docs/examples/d3a558ef226e9dccc1c7c61e1167547f.asciidoc rename to docs/examples/334811cfceb6858aeec5b3461717dd63.asciidoc index 0ed88bba1..cf1347fab 100644 --- a/docs/examples/d3a558ef226e9dccc1c7c61e1167547f.asciidoc +++ b/docs/examples/334811cfceb6858aeec5b3461717dd63.asciidoc @@ -1,11 +1,11 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/geoip.asciidoc:186 +// ingest/processors/geoip.asciidoc:188 [source, python] ---- resp = client.ingest.put_pipeline( id="geoip", - description="Add geoip info", + description="Add ip geolocation info", processors=[ { "geoip": { diff --git a/docs/examples/339c4e5af9f9069ad9912aa574488b59.asciidoc b/docs/examples/339c4e5af9f9069ad9912aa574488b59.asciidoc new file mode 100644 index 000000000..b027282dd --- /dev/null +++ b/docs/examples/339c4e5af9f9069ad9912aa574488b59.asciidoc @@ -0,0 +1,70 @@ +// This file is autogenerated, DO NOT EDIT +// vectors/vector-functions.asciidoc:342 + +[source, python] +---- +resp = client.indices.create( + index="my-index-bit-vectors", + mappings={ + "properties": { + "my_dense_vector": { + "type": "dense_vector", + "index": False, + "element_type": "bit", + "dims": 40 + } + } + }, +) +print(resp) + +resp1 = client.index( + index="my-index-bit-vectors", + id="1", + document={ + "my_dense_vector": [ + 8, + 5, + -15, + 1, + -7 + ] + }, +) +print(resp1) + +resp2 = client.index( + index="my-index-bit-vectors", + id="2", + document={ + "my_dense_vector": [ + -1, + 115, + -3, + 4, + -128 + ] + }, +) +print(resp2) + +resp3 = client.index( + index="my-index-bit-vectors", + id="3", + document={ + "my_dense_vector": [ + 2, + 18, + -5, + 0, + -124 + ] + }, +) +print(resp3) + +resp4 = client.indices.refresh( + index="my-index-bit-vectors", +) +print(resp4) +---- diff --git a/docs/examples/33d480fc6812ada75756cf5337bc9092.asciidoc b/docs/examples/33d480fc6812ada75756cf5337bc9092.asciidoc index b2a058e49..382153680 100644 --- a/docs/examples/33d480fc6812ada75756cf5337bc9092.asciidoc +++ b/docs/examples/33d480fc6812ada75756cf5337bc9092.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/list-connector-sync-jobs-api.asciidoc:57 +// connector/apis/list-connector-sync-jobs-api.asciidoc:58 [source, python] ---- diff --git a/docs/examples/342ddf9121aeddd82fea2464665e25da.asciidoc b/docs/examples/342ddf9121aeddd82fea2464665e25da.asciidoc index 13694ba05..d2c8c5d77 100644 --- a/docs/examples/342ddf9121aeddd82fea2464665e25da.asciidoc +++ b/docs/examples/342ddf9121aeddd82fea2464665e25da.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/create-connector-api.asciidoc:20 +// connector/apis/create-connector-api.asciidoc:21 [source, python] ---- diff --git a/docs/examples/346f28d82acb5427c304aa574fea0008.asciidoc b/docs/examples/346f28d82acb5427c304aa574fea0008.asciidoc index a0683551d..efd1f5771 100644 --- a/docs/examples/346f28d82acb5427c304aa574fea0008.asciidoc +++ b/docs/examples/346f28d82acb5427c304aa574fea0008.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/analyzers/lang-analyzer.asciidoc:1846 +// analysis/analyzers/lang-analyzer.asciidoc:1847 [source, python] ---- diff --git a/docs/examples/35a272df8c919a12d7c3106a18245748.asciidoc b/docs/examples/35a272df8c919a12d7c3106a18245748.asciidoc index db4d626eb..0a003a7e3 100644 --- a/docs/examples/35a272df8c919a12d7c3106a18245748.asciidoc +++ b/docs/examples/35a272df8c919a12d7c3106a18245748.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ml/trained-models/apis/infer-trained-model.asciidoc:849 +// ml/trained-models/apis/infer-trained-model.asciidoc:950 [source, python] ---- diff --git a/docs/examples/365256ebdfa47b449780771d9beba8d9.asciidoc b/docs/examples/365256ebdfa47b449780771d9beba8d9.asciidoc index 0cd8f33d6..ecfda89c9 100644 --- a/docs/examples/365256ebdfa47b449780771d9beba8d9.asciidoc +++ b/docs/examples/365256ebdfa47b449780771d9beba8d9.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/check-in-connector-sync-job-api.asciidoc:49 +// connector/apis/check-in-connector-sync-job-api.asciidoc:50 [source, python] ---- diff --git a/docs/examples/65e892a362d940e4a74965f21c15ca09.asciidoc b/docs/examples/36ac0ef9ea63efc431580f7ade8ad53c.asciidoc similarity index 86% rename from docs/examples/65e892a362d940e4a74965f21c15ca09.asciidoc rename to docs/examples/36ac0ef9ea63efc431580f7ade8ad53c.asciidoc index 02927c0a2..5ccef54b7 100644 --- a/docs/examples/65e892a362d940e4a74965f21c15ca09.asciidoc +++ b/docs/examples/36ac0ef9ea63efc431580f7ade8ad53c.asciidoc @@ -11,7 +11,7 @@ resp = client.reindex( }, dest={ "index": "openai-embeddings", - "pipeline": "openai_embeddings" + "pipeline": "openai_embeddings_pipeline" }, ) print(resp) diff --git a/docs/examples/36b86b97feedcf5632824eefc251d6ed.asciidoc b/docs/examples/36b86b97feedcf5632824eefc251d6ed.asciidoc index 22d10734a..d0107a261 100644 --- a/docs/examples/36b86b97feedcf5632824eefc251d6ed.asciidoc +++ b/docs/examples/36b86b97feedcf5632824eefc251d6ed.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// quickstart/getting-started.asciidoc:244 +// quickstart/getting-started.asciidoc:484 [source, python] ---- diff --git a/docs/examples/36d229f734adcdab00be266a7ce038b1.asciidoc b/docs/examples/36d229f734adcdab00be266a7ce038b1.asciidoc index f4c484a27..b2740333f 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:375 +// mapping/types/dense-vector.asciidoc:406 [source, python] ---- diff --git a/docs/examples/370b297ed3433577adf53e64f572d89d.asciidoc b/docs/examples/370b297ed3433577adf53e64f572d89d.asciidoc index c294fea7b..56aace56f 100644 --- a/docs/examples/370b297ed3433577adf53e64f572d89d.asciidoc +++ b/docs/examples/370b297ed3433577adf53e64f572d89d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/delete-connector-sync-job-api.asciidoc:45 +// connector/apis/delete-connector-sync-job-api.asciidoc:46 [source, python] ---- diff --git a/docs/examples/371962cf63e65c10026177c6a1bad0b6.asciidoc b/docs/examples/371962cf63e65c10026177c6a1bad0b6.asciidoc index b46d30acf..6fbf2785e 100644 --- a/docs/examples/371962cf63e65c10026177c6a1bad0b6.asciidoc +++ b/docs/examples/371962cf63e65c10026177c6a1bad0b6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// slm/apis/slm-start.asciidoc:41 +// tab-widgets/troubleshooting/data/start-slm.asciidoc:63 [source, python] ---- diff --git a/docs/examples/37c73410bf13429279cbc61a413957d8.asciidoc b/docs/examples/37c73410bf13429279cbc61a413957d8.asciidoc index 56fc5156b..b75a76507 100644 --- a/docs/examples/37c73410bf13429279cbc61a413957d8.asciidoc +++ b/docs/examples/37c73410bf13429279cbc61a413957d8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:557 +// how-to/size-your-shards.asciidoc:558 [source, python] ---- diff --git a/docs/examples/38ba93890494bfa7beece58dffa44f98.asciidoc b/docs/examples/38ba93890494bfa7beece58dffa44f98.asciidoc index b82fab19a..cf80b3ae8 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:177 +// mapping/types/semantic-text.asciidoc:207 [source, python] ---- diff --git a/docs/examples/398389933901b572a06a752bc780af7c.asciidoc b/docs/examples/398389933901b572a06a752bc780af7c.asciidoc index 8855fa937..f27040fba 100644 --- a/docs/examples/398389933901b572a06a752bc780af7c.asciidoc +++ b/docs/examples/398389933901b572a06a752bc780af7c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-anthropic.asciidoc:111 +// inference/service-anthropic.asciidoc:131 [source, python] ---- diff --git a/docs/examples/3a2f37f8f32b1aa6bcfb252b9e00f904.asciidoc b/docs/examples/3a2f37f8f32b1aa6bcfb252b9e00f904.asciidoc index 8b4e3c4e5..ff19e59b7 100644 --- a/docs/examples/3a2f37f8f32b1aa6bcfb252b9e00f904.asciidoc +++ b/docs/examples/3a2f37f8f32b1aa6bcfb252b9e00f904.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// index-modules.asciidoc:95 +// index-modules.asciidoc:97 [source, python] ---- diff --git a/docs/examples/3a489743e49902df38e3368cae00717a.asciidoc b/docs/examples/3a489743e49902df38e3368cae00717a.asciidoc new file mode 100644 index 000000000..91462454d --- /dev/null +++ b/docs/examples/3a489743e49902df38e3368cae00717a.asciidoc @@ -0,0 +1,8 @@ +// This file is autogenerated, DO NOT EDIT +// troubleshooting/common-issues/high-cpu-usage.asciidoc:43 + +[source, python] +---- +resp = client.nodes.hot_threads() +print(resp) +---- diff --git a/docs/examples/60d689aae3f8de1e6830329dfd69a6a6.asciidoc b/docs/examples/3a4953663a5a3809b692c27446e16b7f.asciidoc similarity index 85% rename from docs/examples/60d689aae3f8de1e6830329dfd69a6a6.asciidoc rename to docs/examples/3a4953663a5a3809b692c27446e16b7f.asciidoc index 17aa35fd1..5d9373bf9 100644 --- a/docs/examples/60d689aae3f8de1e6830329dfd69a6a6.asciidoc +++ b/docs/examples/3a4953663a5a3809b692c27446e16b7f.asciidoc @@ -11,7 +11,7 @@ resp = client.reindex( }, dest={ "index": "amazon-bedrock-embeddings", - "pipeline": "amazon_bedrock_embeddings" + "pipeline": "amazon_bedrock_embeddings_pipeline" }, ) print(resp) diff --git a/docs/examples/d1a285aa244ec461d68f13e7078a33c0.asciidoc b/docs/examples/3ab8f65fcb55a0e3664c55749ec41efd.asciidoc similarity index 93% rename from docs/examples/d1a285aa244ec461d68f13e7078a33c0.asciidoc rename to docs/examples/3ab8f65fcb55a0e3664c55749ec41efd.asciidoc index ee97186fe..292815dbd 100644 --- a/docs/examples/d1a285aa244ec461d68f13e7078a33c0.asciidoc +++ b/docs/examples/3ab8f65fcb55a0e3664c55749ec41efd.asciidoc @@ -32,7 +32,8 @@ resp = client.indices.create( "decimal_digit", "arabic_normalization", "persian_normalization", - "persian_stop" + "persian_stop", + "persian_stem" ] } } diff --git a/docs/examples/3afc6dacf90b42900ab571aad8a61d75.asciidoc b/docs/examples/3afc6dacf90b42900ab571aad8a61d75.asciidoc index 9168398c6..db5b89d75 100644 --- a/docs/examples/3afc6dacf90b42900ab571aad8a61d75.asciidoc +++ b/docs/examples/3afc6dacf90b42900ab571aad8a61d75.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/analyzers/lang-analyzer.asciidoc:1598 +// analysis/analyzers/lang-analyzer.asciidoc:1599 [source, python] ---- diff --git a/docs/examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc b/docs/examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc deleted file mode 100644 index 0bea327f3..000000000 --- a/docs/examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// ingest/apis/get-geoip-database.asciidoc:55 - -[source, python] ----- -resp = client.perform_request( - "GET", - "/_ingest/geoip/database/my-database-id", -) -print(resp) ----- diff --git a/docs/examples/3c0d0c38e1c819a35a68cdba5ae8ccc4.asciidoc b/docs/examples/3c0d0c38e1c819a35a68cdba5ae8ccc4.asciidoc index d020f99d7..7f0c81b94 100644 --- a/docs/examples/3c0d0c38e1c819a35a68cdba5ae8ccc4.asciidoc +++ b/docs/examples/3c0d0c38e1c819a35a68cdba5ae8ccc4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// tab-widgets/inference-api/infer-api-task.asciidoc:254 +// tab-widgets/inference-api/infer-api-task.asciidoc:262 [source, python] ---- diff --git a/docs/examples/3c345feb7c52fd54bcb5d5505fd8bc3b.asciidoc b/docs/examples/3c345feb7c52fd54bcb5d5505fd8bc3b.asciidoc index e7a52923d..727da4e7c 100644 --- a/docs/examples/3c345feb7c52fd54bcb5d5505fd8bc3b.asciidoc +++ b/docs/examples/3c345feb7c52fd54bcb5d5505fd8bc3b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ml/trained-models/apis/infer-trained-model.asciidoc:1008 +// ml/trained-models/apis/infer-trained-model.asciidoc:1109 [source, python] ---- diff --git a/docs/examples/3cd93a48906069709b76420c66930c01.asciidoc b/docs/examples/3cd93a48906069709b76420c66930c01.asciidoc index fffdc26dd..6c3859dd8 100644 --- a/docs/examples/3cd93a48906069709b76420c66930c01.asciidoc +++ b/docs/examples/3cd93a48906069709b76420c66930c01.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/tokenfilters/stemmer-tokenfilter.asciidoc:265 +// analysis/tokenfilters/stemmer-tokenfilter.asciidoc:264 [source, python] ---- diff --git a/docs/examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc b/docs/examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc index 6c2756e0b..a87fc4d6b 100644 --- a/docs/examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc +++ b/docs/examples/3f2e5132e35b9e8b3203a4a0541cf0d4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ilm/actions/ilm-searchable-snapshot.asciidoc:93 +// ilm/actions/ilm-searchable-snapshot.asciidoc:96 [source, python] ---- diff --git a/docs/examples/3fe4264ace04405989141c43aadfff81.asciidoc b/docs/examples/3fe4264ace04405989141c43aadfff81.asciidoc index dc3644d3d..28dd407e9 100644 --- a/docs/examples/3fe4264ace04405989141c43aadfff81.asciidoc +++ b/docs/examples/3fe4264ace04405989141c43aadfff81.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/security/create-roles.asciidoc:154 +// rest-api/security/create-roles.asciidoc:167 [source, python] ---- diff --git a/docs/examples/405ac843a9156d3cab374e199cac87fb.asciidoc b/docs/examples/405ac843a9156d3cab374e199cac87fb.asciidoc index fa979e0df..15e9b0326 100644 --- a/docs/examples/405ac843a9156d3cab374e199cac87fb.asciidoc +++ b/docs/examples/405ac843a9156d3cab374e199cac87fb.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/create-connector-sync-job-api.asciidoc:15 +// connector/apis/create-connector-sync-job-api.asciidoc:16 [source, python] ---- diff --git a/docs/examples/40bd86e400d27e68b8f0ae580c29d32d.asciidoc b/docs/examples/40bd86e400d27e68b8f0ae580c29d32d.asciidoc index 2cb413860..f150be621 100644 --- a/docs/examples/40bd86e400d27e68b8f0ae580c29d32d.asciidoc +++ b/docs/examples/40bd86e400d27e68b8f0ae580c29d32d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:278 +// how-to/size-your-shards.asciidoc:279 [source, python] ---- diff --git a/docs/examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc b/docs/examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc index 7aeed7da6..1cbdde427 100644 --- a/docs/examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc +++ b/docs/examples/40c3e7bb1fdc125a1ab21bd7d7326694.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:133 +// esql/multivalued-fields.asciidoc:142 [source, python] ---- diff --git a/docs/examples/40f287bf733420bbab134b74c7d0ea5d.asciidoc b/docs/examples/40f287bf733420bbab134b74c7d0ea5d.asciidoc new file mode 100644 index 000000000..003c7f9ea --- /dev/null +++ b/docs/examples/40f287bf733420bbab134b74c7d0ea5d.asciidoc @@ -0,0 +1,24 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/ingest-vectors.asciidoc:68 + +[source, python] +---- +resp = client.index( + index="amazon-reviews", + id="1", + document={ + "review_text": "This product is lifechanging! I'm telling all my friends about it.", + "review_vector": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.8 + ] + }, +) +print(resp) +---- diff --git a/docs/examples/40f97f70e8e743c6a6296c81b920aeb0.asciidoc b/docs/examples/40f97f70e8e743c6a6296c81b920aeb0.asciidoc index 8f4e0432d..06969d9fd 100644 --- a/docs/examples/40f97f70e8e743c6a6296c81b920aeb0.asciidoc +++ b/docs/examples/40f97f70e8e743c6a6296c81b920aeb0.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:313 +// how-to/size-your-shards.asciidoc:314 [source, python] ---- diff --git a/docs/examples/41175d304e660da2931764f9a4418fd3.asciidoc b/docs/examples/41175d304e660da2931764f9a4418fd3.asciidoc index d58c99075..d37e82323 100644 --- a/docs/examples/41175d304e660da2931764f9a4418fd3.asciidoc +++ b/docs/examples/41175d304e660da2931764f9a4418fd3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-pipeline-api.asciidoc:87 +// connector/apis/update-connector-pipeline-api.asciidoc:88 [source, python] ---- diff --git a/docs/examples/413fdcc7c437775a16bb55b81c2bbe2b.asciidoc b/docs/examples/413fdcc7c437775a16bb55b81c2bbe2b.asciidoc index fa73e0203..a626e7e41 100644 --- a/docs/examples/413fdcc7c437775a16bb55b81c2bbe2b.asciidoc +++ b/docs/examples/413fdcc7c437775a16bb55b81c2bbe2b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1618 +// mapping/runtime.asciidoc:1616 [source, python] ---- diff --git a/docs/examples/425eaaf9c7e3b1e77a3474fbab4183b4.asciidoc b/docs/examples/425eaaf9c7e3b1e77a3474fbab4183b4.asciidoc index 3f7f7db24..b6bb4fb2c 100644 --- a/docs/examples/425eaaf9c7e3b1e77a3474fbab4183b4.asciidoc +++ b/docs/examples/425eaaf9c7e3b1e77a3474fbab4183b4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/task-queue-backlog.asciidoc:22 +// troubleshooting/common-issues/task-queue-backlog.asciidoc:25 [source, python] ---- diff --git a/docs/examples/430705509f8367aef92be413f702520b.asciidoc b/docs/examples/430705509f8367aef92be413f702520b.asciidoc index 2bf5117b8..7e2d3af29 100644 --- a/docs/examples/430705509f8367aef92be413f702520b.asciidoc +++ b/docs/examples/430705509f8367aef92be413f702520b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-status-api.asciidoc:75 +// connector/apis/update-connector-status-api.asciidoc:76 [source, python] ---- diff --git a/docs/examples/4310869b97d4224acaa6d66b1e196048.asciidoc b/docs/examples/4310869b97d4224acaa6d66b1e196048.asciidoc index cab2434e0..6b7f6bef2 100644 --- a/docs/examples/4310869b97d4224acaa6d66b1e196048.asciidoc +++ b/docs/examples/4310869b97d4224acaa6d66b1e196048.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-search-elser.asciidoc:172 +// search/search-your-data/semantic-search-elser.asciidoc:184 [source, python] ---- diff --git a/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc b/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc new file mode 100644 index 000000000..14c7b4a3c --- /dev/null +++ b/docs/examples/43d9e314431336a6f084cea76dfd6489.asciidoc @@ -0,0 +1,22 @@ +// This file is autogenerated, DO NOT EDIT +// search/retriever.asciidoc:235 + +[source, python] +---- +resp = client.search( + index="restaurants", + retriever={ + "knn": { + "field": "vector", + "query_vector": [ + 10, + 22, + 77 + ], + "k": 10, + "num_candidates": 10 + } + }, +) +print(resp) +---- diff --git a/docs/examples/44198781d164a15be633d4469485a544.asciidoc b/docs/examples/44198781d164a15be633d4469485a544.asciidoc new file mode 100644 index 000000000..db8b96e88 --- /dev/null +++ b/docs/examples/44198781d164a15be633d4469485a544.asciidoc @@ -0,0 +1,29 @@ +// This file is autogenerated, DO NOT EDIT +// vectors/vector-functions.asciidoc:379 + +[source, python] +---- +resp = client.search( + index="my-index-bit-vectors", + query={ + "script_score": { + "query": { + "match_all": {} + }, + "script": { + "source": "dotProduct(params.query_vector, 'my_dense_vector')", + "params": { + "query_vector": [ + 8, + 5, + -15, + 1, + -7 + ] + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/44385b61342e20ea05f254015b2b04d7.asciidoc b/docs/examples/44385b61342e20ea05f254015b2b04d7.asciidoc index 54d047589..e8c93ac34 100644 --- a/docs/examples/44385b61342e20ea05f254015b2b04d7.asciidoc +++ b/docs/examples/44385b61342e20ea05f254015b2b04d7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/security/bulk-delete-roles.asciidoc:49 +// rest-api/security/bulk-delete-roles.asciidoc:48 [source, python] ---- diff --git a/docs/examples/443e8da9968f1c65f46a2a65a1e1e078.asciidoc b/docs/examples/443e8da9968f1c65f46a2a65a1e1e078.asciidoc index d6f42c8fb..0f02f4bb2 100644 --- a/docs/examples/443e8da9968f1c65f46a2a65a1e1e078.asciidoc +++ b/docs/examples/443e8da9968f1c65f46a2a65a1e1e078.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// data-streams/set-up-tsds.asciidoc:146 +// data-streams/set-up-tsds.asciidoc:147 [source, python] ---- diff --git a/docs/examples/445f8a6ef75fb43da52990b3a9063c78.asciidoc b/docs/examples/445f8a6ef75fb43da52990b3a9063c78.asciidoc index b91e1f5cf..6473b0542 100644 --- a/docs/examples/445f8a6ef75fb43da52990b3a9063c78.asciidoc +++ b/docs/examples/445f8a6ef75fb43da52990b3a9063c78.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1658 +// mapping/runtime.asciidoc:1656 [source, python] ---- diff --git a/docs/examples/44bca3f17d403517af3616754dc795bb.asciidoc b/docs/examples/44bca3f17d403517af3616754dc795bb.asciidoc index 948217540..f7231526e 100644 --- a/docs/examples/44bca3f17d403517af3616754dc795bb.asciidoc +++ b/docs/examples/44bca3f17d403517af3616754dc795bb.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/script-score-query.asciidoc:345 +// query-dsl/script-score-query.asciidoc:352 [source, python] ---- diff --git a/docs/examples/49a19615ebe2c013b8321152163478ab.asciidoc b/docs/examples/49a19615ebe2c013b8321152163478ab.asciidoc new file mode 100644 index 000000000..db5e78aa5 --- /dev/null +++ b/docs/examples/49a19615ebe2c013b8321152163478ab.asciidoc @@ -0,0 +1,42 @@ +// This file is autogenerated, DO NOT EDIT +// scripting/fields.asciidoc:92 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + refresh=True, + document={ + "text": "quick brown fox" + }, +) +print(resp) + +resp1 = client.index( + index="my-index-000001", + id="2", + refresh=True, + document={ + "text": "quick fox" + }, +) +print(resp1) + +resp2 = client.search( + index="my-index-000001", + query={ + "script_score": { + "query": { + "match": { + "text": "quick brown fox" + } + }, + "script": { + "source": "_termStats.termFreq().getAverage()" + } + } + }, +) +print(resp2) +---- diff --git a/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc b/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc new file mode 100644 index 000000000..46d369d7e --- /dev/null +++ b/docs/examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc @@ -0,0 +1,14 @@ +// This file is autogenerated, DO NOT EDIT +// inference/stream-inference.asciidoc:78 + +[source, python] +---- +resp = client.inference.stream_inference( + task_type="completion", + inference_id="openai-completion", + body={ + "input": "What is Elastic?" + }, +) +print(resp) +---- diff --git a/docs/examples/4bef98a2dac575a50ee0783c2269f1db.asciidoc b/docs/examples/4bef98a2dac575a50ee0783c2269f1db.asciidoc index 2058b87cf..3a7b0bcd6 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:469 +// mapping/types/dense-vector.asciidoc:500 [source, python] ---- diff --git a/docs/examples/4c9350ed09b28f00e297ebe73c3b95a2.asciidoc b/docs/examples/4c9350ed09b28f00e297ebe73c3b95a2.asciidoc index f8f432fcb..df7d893d3 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:144 +// inference/service-elasticsearch.asciidoc:195 [source, python] ---- diff --git a/docs/examples/4c95d54b32df4dc49e9762b6c1ae2c05.asciidoc b/docs/examples/4c95d54b32df4dc49e9762b6c1ae2c05.asciidoc index 20d5098b5..da1513b91 100644 --- a/docs/examples/4c95d54b32df4dc49e9762b6c1ae2c05.asciidoc +++ b/docs/examples/4c95d54b32df4dc49e9762b6c1ae2c05.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/text.asciidoc:356 +// mapping/types/text.asciidoc:368 [source, python] ---- diff --git a/docs/examples/4ca15672fc5ab1d80a127d086b6d2837.asciidoc b/docs/examples/4ca15672fc5ab1d80a127d086b6d2837.asciidoc index 11b34e97f..77d2d7733 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:443 +// cluster/allocation-explain.asciidoc:447 [source, python] ---- diff --git a/docs/examples/4da0cb8693e9ceceee2ba3b558014bbf.asciidoc b/docs/examples/4da0cb8693e9ceceee2ba3b558014bbf.asciidoc new file mode 100644 index 000000000..7ea6ba0c0 --- /dev/null +++ b/docs/examples/4da0cb8693e9ceceee2ba3b558014bbf.asciidoc @@ -0,0 +1,38 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-sharepoint-online.asciidoc:934 + +[source, python] +---- +resp = client.update_by_query( + index="INDEX_NAME", + conflicts="proceed", + query={ + "bool": { + "filter": [ + { + "match": { + "object_type": "drive_item" + } + }, + { + "exists": { + "field": "file" + } + }, + { + "range": { + "lastModifiedDateTime": { + "lte": "now-180d" + } + } + } + ] + } + }, + script={ + "source": "ctx._source.body = ''", + "lang": "painless" + }, +) +print(resp) +---- diff --git a/docs/examples/4dab4c5168047ba596af1beb0e55b845.asciidoc b/docs/examples/4dab4c5168047ba596af1beb0e55b845.asciidoc index 275db14c9..314cff18a 100644 --- a/docs/examples/4dab4c5168047ba596af1beb0e55b845.asciidoc +++ b/docs/examples/4dab4c5168047ba596af1beb0e55b845.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// migration/transient-settings-migration-guide.asciidoc:82 +// migration/migrate_9_0/transient-settings-migration-guide.asciidoc:82 [source, python] ---- diff --git a/docs/examples/a53ff77d83222c0e76453e630d64787e.asciidoc b/docs/examples/4dc151eebefd484a28aed1a175743364.asciidoc similarity index 92% rename from docs/examples/a53ff77d83222c0e76453e630d64787e.asciidoc rename to docs/examples/4dc151eebefd484a28aed1a175743364.asciidoc index 52aeed34e..37d5cc81d 100644 --- a/docs/examples/a53ff77d83222c0e76453e630d64787e.asciidoc +++ b/docs/examples/4dc151eebefd484a28aed1a175743364.asciidoc @@ -4,7 +4,7 @@ [source, python] ---- resp = client.ingest.put_pipeline( - id="openai_embeddings", + id="openai_embeddings_pipeline", processors=[ { "inference": { diff --git a/docs/examples/4e3414fc712b16311f9e433dd366f49d.asciidoc b/docs/examples/4e3414fc712b16311f9e433dd366f49d.asciidoc index 0335ed397..f39150a79 100644 --- a/docs/examples/4e3414fc712b16311f9e433dd366f49d.asciidoc +++ b/docs/examples/4e3414fc712b16311f9e433dd366f49d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/delete-inference.asciidoc:70 +// inference/delete-inference.asciidoc:64 [source, python] ---- diff --git a/docs/examples/4ed946065faa92f9950f04e402676a97.asciidoc b/docs/examples/4ed946065faa92f9950f04e402676a97.asciidoc index 47af87b3b..60d9e2c87 100644 --- a/docs/examples/4ed946065faa92f9950f04e402676a97.asciidoc +++ b/docs/examples/4ed946065faa92f9950f04e402676a97.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/info.asciidoc:200 +// rest-api/info.asciidoc:204 [source, python] ---- diff --git a/docs/examples/c9373ff5ed6b026173428fbb92ca2d9f.asciidoc b/docs/examples/4eeded40f30949e359714a5bb6c88612.asciidoc similarity index 87% rename from docs/examples/c9373ff5ed6b026173428fbb92ca2d9f.asciidoc rename to docs/examples/4eeded40f30949e359714a5bb6c88612.asciidoc index 8f1d14d52..b5bb3b50f 100644 --- a/docs/examples/c9373ff5ed6b026173428fbb92ca2d9f.asciidoc +++ b/docs/examples/4eeded40f30949e359714a5bb6c88612.asciidoc @@ -11,7 +11,7 @@ resp = client.reindex( }, dest={ "index": "elser-embeddings", - "pipeline": "elser_embeddings" + "pipeline": "elser_embeddings_pipeline" }, ) print(resp) diff --git a/docs/examples/4f6694ef147a73b1163bde3c13779d26.asciidoc b/docs/examples/4f6694ef147a73b1163bde3c13779d26.asciidoc new file mode 100644 index 000000000..0167e378e --- /dev/null +++ b/docs/examples/4f6694ef147a73b1163bde3c13779d26.asciidoc @@ -0,0 +1,11 @@ +// This file is autogenerated, DO NOT EDIT +// troubleshooting/common-issues/rejected-requests.asciidoc:58 + +[source, python] +---- +resp = client.nodes.stats( + human=True, + filter_path="nodes.*.indexing_pressure", +) +print(resp) +---- diff --git a/docs/examples/4fcca1687d7b2cf08de526539fea5a76.asciidoc b/docs/examples/4fcca1687d7b2cf08de526539fea5a76.asciidoc index 49ed59db1..1abf2a2a7 100644 --- a/docs/examples/4fcca1687d7b2cf08de526539fea5a76.asciidoc +++ b/docs/examples/4fcca1687d7b2cf08de526539fea5a76.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/text-expansion-query.asciidoc:112 +// query-dsl/text-expansion-query.asciidoc:119 [source, python] ---- diff --git a/docs/examples/50d9c0508ddb0fc5ba5a893eec219dd8.asciidoc b/docs/examples/50d9c0508ddb0fc5ba5a893eec219dd8.asciidoc index 13c958321..98b732223 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:125 +// mapping/fields/synthetic-source.asciidoc:136 [source, python] ---- diff --git a/docs/examples/50ddf374cfa8128538ea092ee98b723d.asciidoc b/docs/examples/50ddf374cfa8128538ea092ee98b723d.asciidoc deleted file mode 100644 index e5951558a..000000000 --- a/docs/examples/50ddf374cfa8128538ea092ee98b723d.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/task-queue-backlog.asciidoc:45 - -[source, python] ----- -resp = client.tasks.list( - filter_path="nodes.*.tasks", -) -print(resp) ----- diff --git a/docs/examples/51b44224feee6e2e5974824334474c77.asciidoc b/docs/examples/51b44224feee6e2e5974824334474c77.asciidoc index 134b309bb..9aada93d3 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:342 +// snapshot-restore/repository-s3.asciidoc:364 [source, python] ---- diff --git a/docs/examples/529671ffaf7cc75fe83a81d729788be4.asciidoc b/docs/examples/529671ffaf7cc75fe83a81d729788be4.asciidoc new file mode 100644 index 000000000..69a3e2868 --- /dev/null +++ b/docs/examples/529671ffaf7cc75fe83a81d729788be4.asciidoc @@ -0,0 +1,31 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-known-issues.asciidoc:124 + +[source, python] +---- +resp = client.update( + index=".elastic-connectors", + id="connector_id", + doc={ + "configuration": { + "field_a": { + "type": "str", + "value": "" + }, + "field_b": { + "type": "bool", + "value": False + }, + "field_c": { + "type": "int", + "value": 1 + }, + "field_d": { + "type": "list", + "value": "a,b" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/52b71aa4ae6563abae78cd20ff06d1e9.asciidoc b/docs/examples/52b71aa4ae6563abae78cd20ff06d1e9.asciidoc index 8121426ba..2c3ecbaf6 100644 --- a/docs/examples/52b71aa4ae6563abae78cd20ff06d1e9.asciidoc +++ b/docs/examples/52b71aa4ae6563abae78cd20ff06d1e9.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/hotspotting.asciidoc:142 +// troubleshooting/common-issues/hotspotting.asciidoc:144 [source, python] ---- diff --git a/docs/examples/52f4c5eb08d39f98e2e2f5527ece9731.asciidoc b/docs/examples/52f4c5eb08d39f98e2e2f5527ece9731.asciidoc index 4e861160e..282fd0579 100644 --- a/docs/examples/52f4c5eb08d39f98e2e2f5527ece9731.asciidoc +++ b/docs/examples/52f4c5eb08d39f98e2e2f5527ece9731.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-alibabacloud-ai-search.asciidoc:154 +// inference/service-alibabacloud-ai-search.asciidoc:204 [source, python] ---- diff --git a/docs/examples/533087d787b48878a0bf3fa8d0851b64.asciidoc b/docs/examples/533087d787b48878a0bf3fa8d0851b64.asciidoc deleted file mode 100644 index ee9fdaefd..000000000 --- a/docs/examples/533087d787b48878a0bf3fa8d0851b64.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// ingest/apis/delete-geoip-database.asciidoc:52 - -[source, python] ----- -resp = client.perform_request( - "DELETE", - "/_ingest/geoip/database/example-database-id", -) -print(resp) ----- diff --git a/docs/examples/5457c94f0039c6b95c7f9f305d0c6b58.asciidoc b/docs/examples/5457c94f0039c6b95c7f9f305d0c6b58.asciidoc index 95e608a13..81c231f99 100644 --- a/docs/examples/5457c94f0039c6b95c7f9f305d0c6b58.asciidoc +++ b/docs/examples/5457c94f0039c6b95c7f9f305d0c6b58.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/nodes-stats.asciidoc:2528 +// cluster/nodes-stats.asciidoc:2532 [source, python] ---- diff --git a/docs/examples/3a7a6ab88a49b484fafb10c8eb09b562.asciidoc b/docs/examples/548a9b6f447bb820380c1c23e57c18c3.asciidoc similarity index 92% rename from docs/examples/3a7a6ab88a49b484fafb10c8eb09b562.asciidoc rename to docs/examples/548a9b6f447bb820380c1c23e57c18c3.asciidoc index 3ee86992c..46022c5f3 100644 --- a/docs/examples/3a7a6ab88a49b484fafb10c8eb09b562.asciidoc +++ b/docs/examples/548a9b6f447bb820380c1c23e57c18c3.asciidoc @@ -4,7 +4,7 @@ [source, python] ---- resp = client.ingest.put_pipeline( - id="cohere_embeddings", + id="cohere_embeddings_pipeline", processors=[ { "inference": { diff --git a/docs/examples/54a47b5d07e7bfbea75c77f35eaae18d.asciidoc b/docs/examples/54a47b5d07e7bfbea75c77f35eaae18d.asciidoc new file mode 100644 index 000000000..474cc58ef --- /dev/null +++ b/docs/examples/54a47b5d07e7bfbea75c77f35eaae18d.asciidoc @@ -0,0 +1,15 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-known-issues.asciidoc:77 + +[source, python] +---- +resp = client.indices.put_mapping( + index=".elastic-connectors-sync-jobs-v1", + properties={ + "job_type": { + "type": "keyword" + } + }, +) +print(resp) +---- diff --git a/docs/examples/55085e6a2891040b6ac696561d0787c8.asciidoc b/docs/examples/55085e6a2891040b6ac696561d0787c8.asciidoc new file mode 100644 index 000000000..7e29fa416 --- /dev/null +++ b/docs/examples/55085e6a2891040b6ac696561d0787c8.asciidoc @@ -0,0 +1,32 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/types/passthrough.asciidoc:93 + +[source, python] +---- +resp = client.indices.create( + index="my-index-000002", + mappings={ + "properties": { + "attributes": { + "type": "passthrough", + "priority": 10, + "properties": { + "id": { + "type": "keyword" + } + } + }, + "resource.attributes": { + "type": "passthrough", + "priority": 20, + "properties": { + "id": { + "type": "keyword" + } + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/b468d0124dc485385a34504d5b7af82a.asciidoc b/docs/examples/551467688d8c701315d0a371850a4056.asciidoc similarity index 85% rename from docs/examples/b468d0124dc485385a34504d5b7af82a.asciidoc rename to docs/examples/551467688d8c701315d0a371850a4056.asciidoc index a613d0c3d..6cd149a4a 100644 --- a/docs/examples/b468d0124dc485385a34504d5b7af82a.asciidoc +++ b/docs/examples/551467688d8c701315d0a371850a4056.asciidoc @@ -11,7 +11,7 @@ resp = client.reindex( }, dest={ "index": "hugging-face-embeddings", - "pipeline": "hugging_face_embeddings" + "pipeline": "hugging_face_embeddings_pipeline" }, ) print(resp) diff --git a/docs/examples/97f260817b60f3deb7f7034d7dee7e12.asciidoc b/docs/examples/551799fef2f86e393db83a967e4a30d1.asciidoc similarity index 75% rename from docs/examples/97f260817b60f3deb7f7034d7dee7e12.asciidoc rename to docs/examples/551799fef2f86e393db83a967e4a30d1.asciidoc index 09cf33165..e2b93fb61 100644 --- a/docs/examples/97f260817b60f3deb7f7034d7dee7e12.asciidoc +++ b/docs/examples/551799fef2f86e393db83a967e4a30d1.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/aggregate-metric-double.asciidoc:267 +// mapping/types/aggregate-metric-double.asciidoc:264 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "agg_metric": { "type": "aggregate_metric_double", diff --git a/docs/examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc b/docs/examples/565386eee0951865a684e41fab53b40c.asciidoc similarity index 84% rename from docs/examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc rename to docs/examples/565386eee0951865a684e41fab53b40c.asciidoc index 4e3a57eb3..449bbfbe6 100644 --- a/docs/examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc +++ b/docs/examples/565386eee0951865a684e41fab53b40c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-elser.asciidoc:141 +// inference/service-elser.asciidoc:162 [source, python] ---- @@ -13,7 +13,8 @@ resp = client.inference.put( "enabled": True, "min_number_of_allocations": 3, "max_number_of_allocations": 10 - } + }, + "num_threads": 1 } }, ) diff --git a/docs/examples/5db5349162a4fbe74bffb646926a2495.asciidoc b/docs/examples/56da252798b8e7b006738428aa1a7f4c.asciidoc similarity index 67% rename from docs/examples/5db5349162a4fbe74bffb646926a2495.asciidoc rename to docs/examples/56da252798b8e7b006738428aa1a7f4c.asciidoc index 43631c2cb..f53776159 100644 --- a/docs/examples/5db5349162a4fbe74bffb646926a2495.asciidoc +++ b/docs/examples/56da252798b8e7b006738428aa1a7f4c.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/range.asciidoc:357 +// mapping/types/range.asciidoc:373 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "my_range": { "type": "long_range" diff --git a/docs/examples/57e0bbab98f17d5b564d1ea146a55fe4.asciidoc b/docs/examples/57e0bbab98f17d5b564d1ea146a55fe4.asciidoc index 79a2d5fcf..398c41932 100644 --- a/docs/examples/57e0bbab98f17d5b564d1ea146a55fe4.asciidoc +++ b/docs/examples/57e0bbab98f17d5b564d1ea146a55fe4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-index-template.asciidoc:218 +// indices/put-index-template.asciidoc:221 [source, python] ---- diff --git a/docs/examples/584f502cf840134f2db5f39e2483ced1.asciidoc b/docs/examples/584f502cf840134f2db5f39e2483ced1.asciidoc index 925fc1eb0..cb0cd262e 100644 --- a/docs/examples/584f502cf840134f2db5f39e2483ced1.asciidoc +++ b/docs/examples/584f502cf840134f2db5f39e2483ced1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/analyzers/lang-analyzer.asciidoc:1453 +// analysis/analyzers/lang-analyzer.asciidoc:1454 [source, python] ---- diff --git a/docs/examples/58dd26afc919722e21358c91e112b27a.asciidoc b/docs/examples/58dd26afc919722e21358c91e112b27a.asciidoc new file mode 100644 index 000000000..a96a8752d --- /dev/null +++ b/docs/examples/58dd26afc919722e21358c91e112b27a.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:459 + +[source, python] +---- +resp = client.search( + index="cooking_blog", + query={ + "range": { + "date": { + "gte": "2023-05-01", + "lte": "2023-05-31" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/58f6b72009512851843c7b7a20e9504a.asciidoc b/docs/examples/58f6b72009512851843c7b7a20e9504a.asciidoc new file mode 100644 index 000000000..3fd25391d --- /dev/null +++ b/docs/examples/58f6b72009512851843c7b7a20e9504a.asciidoc @@ -0,0 +1,19 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/types/semantic-text.asciidoc:42 + +[source, python] +---- +resp = client.indices.create( + index="my-index-000002", + mappings={ + "properties": { + "inference_field": { + "type": "semantic_text", + "inference_id": "my-elser-endpoint-for-ingest", + "search_inference_id": "my-elser-endpoint-for-search" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/59d736a4d064ed2013c7ead8e32e0998.asciidoc b/docs/examples/59d736a4d064ed2013c7ead8e32e0998.asciidoc index f825daf85..e0e4ba3c9 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:137 +// inference/service-openai.asciidoc:157 [source, python] ---- diff --git a/docs/examples/804cdf477ec829740e3d045140400c3b.asciidoc b/docs/examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc similarity index 86% rename from docs/examples/804cdf477ec829740e3d045140400c3b.asciidoc rename to docs/examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc index 61607f892..157fc4da6 100644 --- a/docs/examples/804cdf477ec829740e3d045140400c3b.asciidoc +++ b/docs/examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-search-semantic-text.asciidoc:68 +// search/search-your-data/semantic-text-hybrid-search:56 [source, python] ---- diff --git a/docs/examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc b/docs/examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc index 01a6a6ea8..e47c2638d 100644 --- a/docs/examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc +++ b/docs/examples/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-component-template.asciidoc:252 +// indices/put-component-template.asciidoc:255 [source, python] ---- diff --git a/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc b/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc new file mode 100644 index 000000000..02874e925 --- /dev/null +++ b/docs/examples/5bba213a7f543190139d1a69ab2ed076.asciidoc @@ -0,0 +1,14 @@ +// This file is autogenerated, DO NOT EDIT +// esql/esql-across-clusters.asciidoc:301 + +[source, python] +---- +resp = client.esql.async_query( + format="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 + }, +) +print(resp) +---- diff --git a/docs/examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc b/docs/examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc new file mode 100644 index 000000000..b873d1d6e --- /dev/null +++ b/docs/examples/5ceb734e3affe00e2cdc29af748d95bf.asciidoc @@ -0,0 +1,23 @@ +// This file is autogenerated, DO NOT EDIT +// inference/inference-apis.asciidoc:98 + +[source, python] +---- +resp = client.inference.put( + task_type="sparse_embedding", + inference_id="small_chunk_size", + inference_config={ + "service": "elasticsearch", + "service_settings": { + "num_allocations": 1, + "num_threads": 1 + }, + "chunking_settings": { + "strategy": "sentence", + "max_chunk_size": 100, + "sentence_overlap": 0 + } + }, +) +print(resp) +---- diff --git a/docs/examples/0bef1fdefeb2956d60d52d3f38397cad.asciidoc b/docs/examples/5cf12cc4f98d98dc79bead7e6556679c.asciidoc similarity index 55% rename from docs/examples/0bef1fdefeb2956d60d52d3f38397cad.asciidoc rename to docs/examples/5cf12cc4f98d98dc79bead7e6556679c.asciidoc index 8cedec16e..25d500e11 100644 --- a/docs/examples/0bef1fdefeb2956d60d52d3f38397cad.asciidoc +++ b/docs/examples/5cf12cc4f98d98dc79bead7e6556679c.asciidoc @@ -5,9 +5,13 @@ ---- resp = client.indices.create( index="idx", - mappings={ - "_source": { - "mode": "synthetic" + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } } }, ) diff --git a/docs/examples/1d827ae674970692643ea81991e5396e.asciidoc b/docs/examples/5daf8ede198be9b118da5bee9896cb00.asciidoc similarity index 75% rename from docs/examples/1d827ae674970692643ea81991e5396e.asciidoc rename to docs/examples/5daf8ede198be9b118da5bee9896cb00.asciidoc index faaa8e48a..ddad0eab9 100644 --- a/docs/examples/1d827ae674970692643ea81991e5396e.asciidoc +++ b/docs/examples/5daf8ede198be9b118da5bee9896cb00.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/flattened.asciidoc:334 +// mapping/types/flattened.asciidoc:333 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "flattened": { "type": "flattened" diff --git a/docs/examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc b/docs/examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc index a5c9ef373..5b7e50ced 100644 --- a/docs/examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc +++ b/docs/examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/security/bulk-delete-roles.asciidoc:72 +// rest-api/security/bulk-delete-roles.asciidoc:71 [source, python] ---- diff --git a/docs/examples/4b113c7f475cfe484a150ddbb8e6c5c7.asciidoc b/docs/examples/5e021307d331a4483a5aa2198168451b.asciidoc similarity index 61% rename from docs/examples/4b113c7f475cfe484a150ddbb8e6c5c7.asciidoc rename to docs/examples/5e021307d331a4483a5aa2198168451b.asciidoc index c50d2f691..1c6919af5 100644 --- a/docs/examples/4b113c7f475cfe484a150ddbb8e6c5c7.asciidoc +++ b/docs/examples/5e021307d331a4483a5aa2198168451b.asciidoc @@ -1,10 +1,10 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/security/create-roles.asciidoc:170 +// rest-api/security/create-roles.asciidoc:183 [source, python] ---- resp = client.security.put_role( - name="role_with_remote_indices", + name="only_remote_access_role", remote_indices=[ { "clusters": [ @@ -20,6 +20,16 @@ resp = client.security.put_role( ] } ], + remote_cluster=[ + { + "clusters": [ + "my_remote" + ], + "privileges": [ + "monitor_stats" + ] + } + ], ) print(resp) ---- diff --git a/docs/examples/60d3f9a99cc91b43aaa7524a9a74dba0.asciidoc b/docs/examples/60d3f9a99cc91b43aaa7524a9a74dba0.asciidoc new file mode 100644 index 000000000..bf47c1f20 --- /dev/null +++ b/docs/examples/60d3f9a99cc91b43aaa7524a9a74dba0.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// troubleshooting/common-issues/rejected-requests.asciidoc:43 + +[source, python] +---- +resp = client.nodes.stats( + metric="breaker", +) +print(resp) +---- diff --git a/docs/examples/62d3c8fccb11471bdc12555c1a7777f2.asciidoc b/docs/examples/62d3c8fccb11471bdc12555c1a7777f2.asciidoc index 2c535f041..e772c2097 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:89 +// mapping/fields/synthetic-source.asciidoc:100 [source, python] ---- diff --git a/docs/examples/6329fb2840a4373ff6d342f2653247cb.asciidoc b/docs/examples/6329fb2840a4373ff6d342f2653247cb.asciidoc new file mode 100644 index 000000000..d5b3150a1 --- /dev/null +++ b/docs/examples/6329fb2840a4373ff6d342f2653247cb.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/getting-started.asciidoc:299 + +[source, python] +---- +resp = client.indices.get_mapping( + index="books", +) +print(resp) +---- diff --git a/docs/examples/636ee2066450605247ec1f68d04b8ee4.asciidoc b/docs/examples/636ee2066450605247ec1f68d04b8ee4.asciidoc index f80d11e67..bf1dc4f69 100644 --- a/docs/examples/636ee2066450605247ec1f68d04b8ee4.asciidoc +++ b/docs/examples/636ee2066450605247ec1f68d04b8ee4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1467 +// mapping/runtime.asciidoc:1465 [source, python] ---- diff --git a/docs/examples/63a53fcb0717ae9033a679cbfc932851.asciidoc b/docs/examples/63a53fcb0717ae9033a679cbfc932851.asciidoc new file mode 100644 index 000000000..15c170aba --- /dev/null +++ b/docs/examples/63a53fcb0717ae9033a679cbfc932851.asciidoc @@ -0,0 +1,20 @@ +// This file is autogenerated, DO NOT EDIT +// inference/service-alibabacloud-ai-search.asciidoc:168 + +[source, python] +---- +resp = client.inference.put( + task_type="completion", + inference_id="alibabacloud_ai_search_completion", + inference_config={ + "service": "alibabacloud-ai-search", + "service_settings": { + "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com", + "api_key": "{{API_KEY}}", + "service_id": "ops-qwen-turbo", + "workspace": "default" + } + }, +) +print(resp) +---- diff --git a/docs/examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc b/docs/examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc index 5560f6733..c7d05b973 100644 --- a/docs/examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc +++ b/docs/examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/security/bulk-create-roles.asciidoc:106 +// rest-api/security/bulk-create-roles.asciidoc:119 [source, python] ---- diff --git a/docs/examples/640621cea39cdeeb76fbc95bff31a18d.asciidoc b/docs/examples/640621cea39cdeeb76fbc95bff31a18d.asciidoc index 7d20c7a29..34660de39 100644 --- a/docs/examples/640621cea39cdeeb76fbc95bff31a18d.asciidoc +++ b/docs/examples/640621cea39cdeeb76fbc95bff31a18d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-last-sync-api.asciidoc:115 +// connector/apis/update-connector-last-sync-api.asciidoc:116 [source, python] ---- diff --git a/docs/examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc b/docs/examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc new file mode 100644 index 000000000..2df817d3f --- /dev/null +++ b/docs/examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// cluster/stats.asciidoc:1902 + +[source, python] +---- +resp = client.cluster.stats( + include_remotes=True, +) +print(resp) +---- diff --git a/docs/examples/643e19c3b6ac1134554dd890e2249c2b.asciidoc b/docs/examples/643e19c3b6ac1134554dd890e2249c2b.asciidoc index 8a0fb1610..0c085cc7e 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:26 +// data-streams/logs.asciidoc:18 [source, python] ---- diff --git a/docs/examples/64a79861225553799b26e118d7851dcc.asciidoc b/docs/examples/64a79861225553799b26e118d7851dcc.asciidoc index 13d42948d..d9c6bb56c 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:57 +// ilm/error-handling.asciidoc:60 [source, python] ---- diff --git a/docs/examples/6606d46685d10377b996b5f20f1229b5.asciidoc b/docs/examples/6606d46685d10377b996b5f20f1229b5.asciidoc index 9e0132018..793512aa2 100644 --- a/docs/examples/6606d46685d10377b996b5f20f1229b5.asciidoc +++ b/docs/examples/6606d46685d10377b996b5f20f1229b5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-index-name-api.asciidoc:75 +// connector/apis/update-connector-index-name-api.asciidoc:76 [source, python] ---- diff --git a/docs/examples/67154a4837cf996a9a9c3e61d6e9d1b3.asciidoc b/docs/examples/67154a4837cf996a9a9c3e61d6e9d1b3.asciidoc deleted file mode 100644 index 647b80bda..000000000 --- a/docs/examples/67154a4837cf996a9a9c3e61d6e9d1b3.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// migration/migrate_8_0/migrate_to_java_time.asciidoc:289 - -[source, python] ----- -resp = client.reindex( - source={ - "index": "my-index-000001" - }, - dest={ - "index": "my-index-000002" - }, -) -print(resp) ----- diff --git a/docs/examples/67bab07fda27ef77e3bc948211051a33.asciidoc b/docs/examples/67bab07fda27ef77e3bc948211051a33.asciidoc index d7b22ab98..e7072b9dc 100644 --- a/docs/examples/67bab07fda27ef77e3bc948211051a33.asciidoc +++ b/docs/examples/67bab07fda27ef77e3bc948211051a33.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/hotspotting.asciidoc:154 +// troubleshooting/common-issues/hotspotting.asciidoc:156 [source, python] ---- diff --git a/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc b/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc new file mode 100644 index 000000000..72ee5b9f0 --- /dev/null +++ b/docs/examples/69541f0bb81ab3797926bb2a00607cda.asciidoc @@ -0,0 +1,19 @@ +// This file is autogenerated, DO NOT EDIT +// search/retriever.asciidoc:512 + +[source, python] +---- +resp = client.inference.put( + task_type="rerank", + inference_id="my-msmarco-minilm-model", + inference_config={ + "service": "elasticsearch", + "service_settings": { + "num_allocations": 1, + "num_threads": 1, + "model_id": "cross-encoder__ms-marco-minilm-l-6-v2" + } + }, +) +print(resp) +---- diff --git a/docs/examples/69ab708fe65a75f870223d2289c3d171.asciidoc b/docs/examples/69ab708fe65a75f870223d2289c3d171.asciidoc index 342a15224..9bacae628 100644 --- a/docs/examples/69ab708fe65a75f870223d2289c3d171.asciidoc +++ b/docs/examples/69ab708fe65a75f870223d2289c3d171.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/redact.asciidoc:106 +// ingest/processors/redact.asciidoc:107 [source, python] ---- diff --git a/docs/examples/a69c7c3412af73758f629e76263063b5.asciidoc b/docs/examples/6b6e275efe3d2aafe0fc3443f2c96868.asciidoc similarity index 84% rename from docs/examples/a69c7c3412af73758f629e76263063b5.asciidoc rename to docs/examples/6b6e275efe3d2aafe0fc3443f2c96868.asciidoc index 8ffb9afbe..c10420e51 100644 --- a/docs/examples/a69c7c3412af73758f629e76263063b5.asciidoc +++ b/docs/examples/6b6e275efe3d2aafe0fc3443f2c96868.asciidoc @@ -11,7 +11,7 @@ resp = client.reindex( }, dest={ "index": "google-vertex-ai-embeddings", - "pipeline": "google_vertex_ai_embeddings" + "pipeline": "google_vertex_ai_embeddings_pipeline" }, ) print(resp) diff --git a/docs/examples/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc b/docs/examples/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc index 0b217472d..5afe00179 100644 --- a/docs/examples/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc +++ b/docs/examples/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/list-connector-sync-jobs-api.asciidoc:64 +// connector/apis/list-connector-sync-jobs-api.asciidoc:65 [source, python] ---- diff --git a/docs/examples/10535507a9735fcf06600444b9067d4c.asciidoc b/docs/examples/6cb1dae368c945ecf7c9ec332a5743a2.asciidoc similarity index 74% rename from docs/examples/10535507a9735fcf06600444b9067d4c.asciidoc rename to docs/examples/6cb1dae368c945ecf7c9ec332a5743a2.asciidoc index 475eb922f..553747119 100644 --- a/docs/examples/10535507a9735fcf06600444b9067d4c.asciidoc +++ b/docs/examples/6cb1dae368c945ecf7c9ec332a5743a2.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/text.asciidoc:184 +// mapping/types/text.asciidoc:180 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "text": { "type": "text", diff --git a/docs/examples/6db118771354792646229e7a3c30c7e9.asciidoc b/docs/examples/6db118771354792646229e7a3c30c7e9.asciidoc index ad36969c7..26dd39276 100644 --- a/docs/examples/6db118771354792646229e7a3c30c7e9.asciidoc +++ b/docs/examples/6db118771354792646229e7a3c30c7e9.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:993 +// mapping/runtime.asciidoc:991 [source, python] ---- diff --git a/docs/examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc b/docs/examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc index 10fcf33a0..3e1bbdaa0 100644 --- a/docs/examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc +++ b/docs/examples/6dcd3916679f6aa64f79524c75991ebd.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:245 +// esql/esql-rest.asciidoc:247 [source, python] ---- diff --git a/docs/examples/6ddd4e657efbf45def430a6419825796.asciidoc b/docs/examples/6ddd4e657efbf45def430a6419825796.asciidoc index b7861383a..f3e419d1f 100644 --- a/docs/examples/6ddd4e657efbf45def430a6419825796.asciidoc +++ b/docs/examples/6ddd4e657efbf45def430a6419825796.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-azure-ai-studio.asciidoc:159 +// inference/service-azure-ai-studio.asciidoc:179 [source, python] ---- diff --git a/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc b/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc new file mode 100644 index 000000000..798e0b46a --- /dev/null +++ b/docs/examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc @@ -0,0 +1,52 @@ +// This file is autogenerated, DO NOT EDIT +// search/retriever.asciidoc:328 + +[source, python] +---- +resp = client.search( + index="movies", + retriever={ + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "sparse_vector": { + "field": "plot_embedding", + "inference_id": "my-elser-model", + "query": "films that explore psychological depths" + } + } + } + }, + { + "standard": { + "query": { + "multi_match": { + "query": "crime", + "fields": [ + "plot", + "title" + ] + } + } + } + }, + { + "knn": { + "field": "vector", + "query_vector": [ + 10, + 22, + 77 + ], + "k": 10, + "num_candidates": 10 + } + } + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/6f8bdca97e43aac75e32de655aa4314a.asciidoc b/docs/examples/6f8bdca97e43aac75e32de655aa4314a.asciidoc new file mode 100644 index 000000000..31751614e --- /dev/null +++ b/docs/examples/6f8bdca97e43aac75e32de655aa4314a.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-API-tutorial.asciidoc:450 + +[source, python] +---- +resp = client.connector.delete( + connector_id="my-connector-id&delete_sync_jobs=true", +) +print(resp) +---- diff --git a/docs/examples/7163346755400594d1dd7e445aa19ff0.asciidoc b/docs/examples/7163346755400594d1dd7e445aa19ff0.asciidoc new file mode 100644 index 000000000..914d14320 --- /dev/null +++ b/docs/examples/7163346755400594d1dd7e445aa19ff0.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-API-tutorial.asciidoc:426 + +[source, python] +---- +resp = client.search( + index="music", +) +print(resp) +---- diff --git a/docs/examples/8bf51fd50195b46bacbf872f460ebec2.asciidoc b/docs/examples/71998bb300ac2a58419b0772cdc1c586.asciidoc similarity index 70% rename from docs/examples/8bf51fd50195b46bacbf872f460ebec2.asciidoc rename to docs/examples/71998bb300ac2a58419b0772cdc1c586.asciidoc index 550e81a85..0b9cdbc9f 100644 --- a/docs/examples/8bf51fd50195b46bacbf872f460ebec2.asciidoc +++ b/docs/examples/71998bb300ac2a58419b0772cdc1c586.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/version.asciidoc:86 +// mapping/types/version.asciidoc:85 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "versions": { "type": "version" diff --git a/docs/examples/71c629c44bf3c542a0daacbfc253c4b0.asciidoc b/docs/examples/71c629c44bf3c542a0daacbfc253c4b0.asciidoc index 4644d9566..bd0b9c3ca 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:1812 +// cluster/stats.asciidoc:1895 [source, python] ---- diff --git a/docs/examples/72ae3851160fcf02b8e2cdfd4e57d238.asciidoc b/docs/examples/72ae3851160fcf02b8e2cdfd4e57d238.asciidoc index 570c50a35..55eef3143 100644 --- a/docs/examples/72ae3851160fcf02b8e2cdfd4e57d238.asciidoc +++ b/docs/examples/72ae3851160fcf02b8e2cdfd4e57d238.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ilm/apis/start.asciidoc:75 +// tab-widgets/troubleshooting/data/start-ilm.asciidoc:66 [source, python] ---- diff --git a/docs/examples/741180473ba526219578ad0422f4fe81.asciidoc b/docs/examples/741180473ba526219578ad0422f4fe81.asciidoc index bb11e7c3e..328eb727d 100644 --- a/docs/examples/741180473ba526219578ad0422f4fe81.asciidoc +++ b/docs/examples/741180473ba526219578ad0422f4fe81.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-features-api.asciidoc:90 +// connector/apis/update-connector-features-api.asciidoc:91 [source, python] ---- diff --git a/docs/examples/7429b16221fe741fd31b0584786dd0b0.asciidoc b/docs/examples/7429b16221fe741fd31b0584786dd0b0.asciidoc index a124435ab..e9d165184 100644 --- a/docs/examples/7429b16221fe741fd31b0584786dd0b0.asciidoc +++ b/docs/examples/7429b16221fe741fd31b0584786dd0b0.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/post-inference.asciidoc:248 +// inference/post-inference.asciidoc:243 [source, python] ---- diff --git a/docs/examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc b/docs/examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc index 8cf092fe3..73bd36aa9 100644 --- a/docs/examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc +++ b/docs/examples/744aeb2af40f519e430e21e004e3c3b7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:91 +// esql/multivalued-fields.asciidoc:97 [source, python] ---- diff --git a/docs/examples/a4ec42130f3c75fc9d1d5f7cb6222cd5.asciidoc b/docs/examples/745864ef2427188241a4702b94ea57be.asciidoc similarity index 94% rename from docs/examples/a4ec42130f3c75fc9d1d5f7cb6222cd5.asciidoc rename to docs/examples/745864ef2427188241a4702b94ea57be.asciidoc index 8f5158ccc..f2b580fb5 100644 --- a/docs/examples/a4ec42130f3c75fc9d1d5f7cb6222cd5.asciidoc +++ b/docs/examples/745864ef2427188241a4702b94ea57be.asciidoc @@ -11,7 +11,7 @@ resp = client.search( "filter": { "range": { "price": { - "to": "500" + "lte": "500" } } } diff --git a/docs/examples/746e0a1cb5984f2672963b363505c7b3.asciidoc b/docs/examples/746e0a1cb5984f2672963b363505c7b3.asciidoc index 265bb0fb3..5c56c2f3f 100644 --- a/docs/examples/746e0a1cb5984f2672963b363505c7b3.asciidoc +++ b/docs/examples/746e0a1cb5984f2672963b363505c7b3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/date.asciidoc:189 +// mapping/types/date.asciidoc:188 [source, python] ---- diff --git a/docs/examples/7471e97aaaf21c3a200abdd89f15c3cc.asciidoc b/docs/examples/7471e97aaaf21c3a200abdd89f15c3cc.asciidoc index 63f567ecd..471f96714 100644 --- a/docs/examples/7471e97aaaf21c3a200abdd89f15c3cc.asciidoc +++ b/docs/examples/7471e97aaaf21c3a200abdd89f15c3cc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/intervals-query.asciidoc:312 +// query-dsl/intervals-query.asciidoc:383 [source, python] ---- diff --git a/docs/examples/35b686d9d9e915d0dea7a4251781767d.asciidoc b/docs/examples/750ac969f9a05567f5cdf4f93d6244b6.asciidoc similarity index 95% rename from docs/examples/35b686d9d9e915d0dea7a4251781767d.asciidoc rename to docs/examples/750ac969f9a05567f5cdf4f93d6244b6.asciidoc index 02508226f..455c5f508 100644 --- a/docs/examples/35b686d9d9e915d0dea7a4251781767d.asciidoc +++ b/docs/examples/750ac969f9a05567f5cdf4f93d6244b6.asciidoc @@ -4,7 +4,6 @@ [source, python] ---- resp = client.cluster.reroute( - metric="none", commands=[ { "allocate_empty_primary": { diff --git a/docs/examples/7594a9a85c8511701e281974cbc253e1.asciidoc b/docs/examples/7594a9a85c8511701e281974cbc253e1.asciidoc index 1425a25e1..3e348d90c 100644 --- a/docs/examples/7594a9a85c8511701e281974cbc253e1.asciidoc +++ b/docs/examples/7594a9a85c8511701e281974cbc253e1.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// tab-widgets/inference-api/infer-api-task.asciidoc:228 +// tab-widgets/inference-api/infer-api-task.asciidoc:236 [source, python] ---- diff --git a/docs/examples/76c73b54f3f1e5cb1c0fcccd7c3fd18e.asciidoc b/docs/examples/76c73b54f3f1e5cb1c0fcccd7c3fd18e.asciidoc new file mode 100644 index 000000000..de9e27866 --- /dev/null +++ b/docs/examples/76c73b54f3f1e5cb1c0fcccd7c3fd18e.asciidoc @@ -0,0 +1,87 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/ingest-vectors.asciidoc:86 + +[source, python] +---- +resp = client.bulk( + operations=[ + { + "index": { + "_index": "amazon-reviews", + "_id": "2" + } + }, + { + "review_text": "This product is amazing! I love it.", + "review_vector": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.8 + ] + }, + { + "index": { + "_index": "amazon-reviews", + "_id": "3" + } + }, + { + "review_text": "This product is terrible. I hate it.", + "review_vector": [ + 0.8, + 0.7, + 0.6, + 0.5, + 0.4, + 0.3, + 0.2, + 0.1 + ] + }, + { + "index": { + "_index": "amazon-reviews", + "_id": "4" + } + }, + { + "review_text": "This product is great. I can do anything with it.", + "review_vector": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.8 + ] + }, + { + "index": { + "_index": "amazon-reviews", + "_id": "5" + } + }, + { + "review_text": "This product has ruined my life and the lives of my family and friends.", + "review_vector": [ + 0.8, + 0.7, + 0.6, + 0.5, + 0.4, + 0.3, + 0.2, + 0.1 + ] + } + ], +) +print(resp) +---- diff --git a/docs/examples/77082b1ffaae9ac52dfc133fa597baa7.asciidoc b/docs/examples/77082b1ffaae9ac52dfc133fa597baa7.asciidoc new file mode 100644 index 000000000..c2b612309 --- /dev/null +++ b/docs/examples/77082b1ffaae9ac52dfc133fa597baa7.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:241 + +[source, python] +---- +resp = client.search( + index="cooking_blog", + query={ + "match": { + "description": { + "query": "fluffy pancakes", + "operator": "and" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/7709a48020a6cefbbe547fb944541cdb.asciidoc b/docs/examples/7709a48020a6cefbbe547fb944541cdb.asciidoc index 10db24405..7e83448bc 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:392 +// mapping/types/dense-vector.asciidoc:423 [source, python] ---- diff --git a/docs/examples/7752b677825523bfb0c38ad9325a6d47.asciidoc b/docs/examples/7752b677825523bfb0c38ad9325a6d47.asciidoc index 3d71c943a..75baf555d 100644 --- a/docs/examples/7752b677825523bfb0c38ad9325a6d47.asciidoc +++ b/docs/examples/7752b677825523bfb0c38ad9325a6d47.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/delete-connector-api.asciidoc:69 +// connector/apis/delete-connector-api.asciidoc:70 [source, python] ---- diff --git a/docs/examples/776b553df0e507c96dbdbaedecaca0cc.asciidoc b/docs/examples/776b553df0e507c96dbdbaedecaca0cc.asciidoc index 3794702c4..95f751ddd 100644 --- a/docs/examples/776b553df0e507c96dbdbaedecaca0cc.asciidoc +++ b/docs/examples/776b553df0e507c96dbdbaedecaca0cc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ml/trained-models/apis/infer-trained-model.asciidoc:880 +// ml/trained-models/apis/infer-trained-model.asciidoc:981 [source, python] ---- diff --git a/docs/examples/77b90f6787195767b6da60d8532714b4.asciidoc b/docs/examples/77b90f6787195767b6da60d8532714b4.asciidoc index 5590d6b84..8e749b938 100644 --- a/docs/examples/77b90f6787195767b6da60d8532714b4.asciidoc +++ b/docs/examples/77b90f6787195767b6da60d8532714b4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-azure-openai.asciidoc:121 +// inference/service-azure-openai.asciidoc:141 [source, python] ---- diff --git a/docs/examples/77d0780c5faea4c9ec51a322a6811b3b.asciidoc b/docs/examples/77d0780c5faea4c9ec51a322a6811b3b.asciidoc index 80d2beda2..35a1df0e3 100644 --- a/docs/examples/77d0780c5faea4c9ec51a322a6811b3b.asciidoc +++ b/docs/examples/77d0780c5faea4c9ec51a322a6811b3b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1311 +// mapping/runtime.asciidoc:1309 [source, python] ---- diff --git a/docs/examples/78176cd6f570e1534bb40b19e6e900b6.asciidoc b/docs/examples/78176cd6f570e1534bb40b19e6e900b6.asciidoc index 62ff4fba8..e0ae96d2b 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:87 +// cat/alias.asciidoc:85 [source, python] ---- diff --git a/docs/examples/84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc b/docs/examples/7888c509774a2abfe82ca370c43d8789.asciidoc similarity index 86% rename from docs/examples/84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc rename to docs/examples/7888c509774a2abfe82ca370c43d8789.asciidoc index d25d4f72b..9856bdaa3 100644 --- a/docs/examples/84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc +++ b/docs/examples/7888c509774a2abfe82ca370c43d8789.asciidoc @@ -11,7 +11,7 @@ resp = client.reindex( }, dest={ "index": "cohere-embeddings", - "pipeline": "cohere_embeddings" + "pipeline": "cohere_embeddings_pipeline" }, ) print(resp) diff --git a/docs/examples/79ff4e7fa5c004226d05d7e2bfb5dc1e.asciidoc b/docs/examples/79ff4e7fa5c004226d05d7e2bfb5dc1e.asciidoc new file mode 100644 index 000000000..ac63f53fb --- /dev/null +++ b/docs/examples/79ff4e7fa5c004226d05d7e2bfb5dc1e.asciidoc @@ -0,0 +1,51 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/types/passthrough.asciidoc:134 + +[source, python] +---- +resp = client.indices.put_index_template( + name="my-metrics", + index_patterns=[ + "metrics-mymetrics-*" + ], + priority=200, + data_stream={}, + template={ + "settings": { + "index.mode": "time_series" + }, + "mappings": { + "properties": { + "attributes": { + "type": "passthrough", + "priority": 10, + "time_series_dimension": True, + "properties": { + "host.name": { + "type": "keyword" + } + } + }, + "cpu": { + "type": "integer", + "time_series_metric": "counter" + } + } + } + }, +) +print(resp) + +resp1 = client.index( + index="metrics-mymetrics-test", + document={ + "@timestamp": "2020-01-01T00:00:00.000Z", + "attributes": { + "host.name": "foo", + "zone": "bar" + }, + "cpu": 10 + }, +) +print(resp1) +---- diff --git a/docs/examples/7a0eb2222fe282d3aab66e12feff2a3b.asciidoc b/docs/examples/7a0eb2222fe282d3aab66e12feff2a3b.asciidoc index 77928735e..a829a70e7 100644 --- a/docs/examples/7a0eb2222fe282d3aab66e12feff2a3b.asciidoc +++ b/docs/examples/7a0eb2222fe282d3aab66e12feff2a3b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:834 +// mapping/runtime.asciidoc:832 [source, python] ---- diff --git a/docs/examples/7a27336a61284d079f3cc3994cf927d1.asciidoc b/docs/examples/7a27336a61284d079f3cc3994cf927d1.asciidoc new file mode 100644 index 000000000..5115db85e --- /dev/null +++ b/docs/examples/7a27336a61284d079f3cc3994cf927d1.asciidoc @@ -0,0 +1,58 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/dls-overview.asciidoc:283 + +[source, python] +---- +resp = client.security.create_api_key( + name="my-api-key", + role_descriptors={ + "role-source1": { + "indices": [ + { + "names": [ + "source1" + ], + "privileges": [ + "read" + ], + "query": { + "template": { + "params": { + "access_control": [ + "example.user@example.com", + "source1-user-group" + ] + } + }, + "source": "..." + } + } + ] + }, + "role-source2": { + "indices": [ + { + "names": [ + "source2" + ], + "privileges": [ + "read" + ], + "query": { + "template": { + "params": { + "access_control": [ + "example.user@example.com", + "source2-user-group" + ] + } + }, + "source": "..." + } + } + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/7a32f44a1511ecb0d3f0b0ff2aca5c44.asciidoc b/docs/examples/7a32f44a1511ecb0d3f0b0ff2aca5c44.asciidoc deleted file mode 100644 index 984cd88e4..000000000 --- a/docs/examples/7a32f44a1511ecb0d3f0b0ff2aca5c44.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// migration/migrate_8_0/migrate_to_java_time.asciidoc:305 - -[source, python] ----- -resp = client.indices.update_aliases( - actions=[ - { - "remove": { - "index": "my-index-000001", - "alias": "my-index" - } - }, - { - "add": { - "index": "my-index-000002", - "alias": "my-index" - } - } - ], -) -print(resp) ----- diff --git a/docs/examples/7af1f62b0cf496cbf593d83d30b472cc.asciidoc b/docs/examples/7af1f62b0cf496cbf593d83d30b472cc.asciidoc new file mode 100644 index 000000000..b98d052b9 --- /dev/null +++ b/docs/examples/7af1f62b0cf496cbf593d83d30b472cc.asciidoc @@ -0,0 +1,31 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-API-tutorial.asciidoc:226 + +[source, python] +---- +resp = client.security.create_api_key( + name="music-connector", + role_descriptors={ + "music-connector-role": { + "cluster": [ + "monitor", + "manage_connector" + ], + "indices": [ + { + "names": [ + "music", + ".search-acl-filter-music", + ".elastic-connectors*" + ], + "privileges": [ + "all" + ], + "allow_restricted_indices": False + } + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/7b9691bd34a02dd859562eb927f175e0.asciidoc b/docs/examples/7b9691bd34a02dd859562eb927f175e0.asciidoc new file mode 100644 index 000000000..0fd593aaf --- /dev/null +++ b/docs/examples/7b9691bd34a02dd859562eb927f175e0.asciidoc @@ -0,0 +1,23 @@ +// This file is autogenerated, DO NOT EDIT +// inference/service-elasticsearch.asciidoc:132 + +[source, python] +---- +resp = client.inference.put( + task_type="sparse_embedding", + inference_id="my-elser-model", + inference_config={ + "service": "elasticsearch", + "service_settings": { + "adaptive_allocations": { + "enabled": True, + "min_number_of_allocations": 1, + "max_number_of_allocations": 10 + }, + "num_threads": 1, + "model_id": ".elser_model_2" + } + }, +) +print(resp) +---- diff --git a/docs/examples/7c8f207e43115ea8f20d2298be5aaebc.asciidoc b/docs/examples/7c8f207e43115ea8f20d2298be5aaebc.asciidoc deleted file mode 100644 index 106984537..000000000 --- a/docs/examples/7c8f207e43115ea8f20d2298be5aaebc.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// ingest/apis/simulate-ingest.asciidoc:56 - -[source, python] ----- -resp = client.simulate.ingest( - body={ - "docs": [ - { - "_index": "my-index", - "_id": "id", - "_source": { - "foo": "bar" - } - }, - { - "_index": "my-index", - "_id": "id", - "_source": { - "foo": "rab" - } - } - ], - "pipeline_substitutions": { - "my-pipeline": { - "processors": [ - { - "set": { - "field": "field3", - "value": "value3" - } - } - ] - } - } - }, -) -print(resp) ----- diff --git a/docs/examples/f3574cfee3971d98417b8dc574a91be0.asciidoc b/docs/examples/7d3a74fe0ba3fe95d1c3275365ff9315.asciidoc similarity index 76% rename from docs/examples/f3574cfee3971d98417b8dc574a91be0.asciidoc rename to docs/examples/7d3a74fe0ba3fe95d1c3275365ff9315.asciidoc index 0d23bbd06..c812891e4 100644 --- a/docs/examples/f3574cfee3971d98417b8dc574a91be0.asciidoc +++ b/docs/examples/7d3a74fe0ba3fe95d1c3275365ff9315.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/flattened.asciidoc:367 +// mapping/types/flattened.asciidoc:374 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "flattened": { "type": "flattened" diff --git a/docs/examples/7db09cab02d71f3a10d91071216d80fc.asciidoc b/docs/examples/7db09cab02d71f3a10d91071216d80fc.asciidoc new file mode 100644 index 000000000..cd720284a --- /dev/null +++ b/docs/examples/7db09cab02d71f3a10d91071216d80fc.asciidoc @@ -0,0 +1,27 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/ingest-vectors.asciidoc:108 + +[source, python] +---- +resp = client.search( + index="amazon-reviews", + retriever={ + "knn": { + "field": "review_vector", + "query_vector": [ + 0.1, + 0.2, + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.8 + ], + "k": 2, + "num_candidates": 5 + } + }, +) +print(resp) +---- diff --git a/docs/examples/7db798942cf2d334456e30ef5fcb801b.asciidoc b/docs/examples/7db798942cf2d334456e30ef5fcb801b.asciidoc new file mode 100644 index 000000000..b91fa55a9 --- /dev/null +++ b/docs/examples/7db798942cf2d334456e30ef5fcb801b.asciidoc @@ -0,0 +1,17 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:161 + +[source, python] +---- +resp = client.search( + index="cooking_blog", + query={ + "match": { + "description": { + "query": "fluffy pancakes" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc b/docs/examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc new file mode 100644 index 000000000..a2b9f8e5c --- /dev/null +++ b/docs/examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc @@ -0,0 +1,34 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/processors/ip-location.asciidoc:188 + +[source, python] +---- +resp = client.ingest.put_pipeline( + id="ip_location", + description="Add ip geolocation info", + processors=[ + { + "ip_location": { + "field": "ip" + } + } + ], +) +print(resp) + +resp1 = client.index( + index="my-index-000001", + id="my_id", + pipeline="ip_location", + document={ + "ip": "80.231.5.0" + }, +) +print(resp1) + +resp2 = client.get( + index="my-index-000001", + id="my_id", +) +print(resp2) +---- diff --git a/docs/examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc b/docs/examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc index 1e29997a4..0c25a55f4 100644 --- a/docs/examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc +++ b/docs/examples/7fde3ff91c4a2e7080444af37d5cd287.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:286 +// esql/esql-rest.asciidoc:288 [source, python] ---- diff --git a/docs/examples/981b331db1404b39c1a612a135e4e76d.asciidoc b/docs/examples/8080cd9e24a8785728ce7c372ec4acf1.asciidoc similarity index 50% rename from docs/examples/981b331db1404b39c1a612a135e4e76d.asciidoc rename to docs/examples/8080cd9e24a8785728ce7c372ec4acf1.asciidoc index 6f3574e63..f6290d1e7 100644 --- a/docs/examples/981b331db1404b39c1a612a135e4e76d.asciidoc +++ b/docs/examples/8080cd9e24a8785728ce7c372ec4acf1.asciidoc @@ -1,17 +1,14 @@ // This file is autogenerated, DO NOT EDIT -// ingest/apis/put-geoip-database.asciidoc:15 +// watcher/how-watcher-works.asciidoc:159 [source, python] ---- resp = client.perform_request( "PUT", - "/_ingest/geoip/database/my-database-id", + "/_watcher/settings", headers={"Content-Type": "application/json"}, body={ - "name": "GeoIP2-Domain", - "maxmind": { - "account_id": "1025402" - } + "index.routing.allocation.include.role": "watcher" }, ) print(resp) diff --git a/docs/examples/82844ef45e11c0eece100d3109db3182.asciidoc b/docs/examples/82844ef45e11c0eece100d3109db3182.asciidoc index 67b526d67..8886c646e 100644 --- a/docs/examples/82844ef45e11c0eece100d3109db3182.asciidoc +++ b/docs/examples/82844ef45e11c0eece100d3109db3182.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-amazon-bedrock.asciidoc:154 +// inference/service-amazon-bedrock.asciidoc:174 [source, python] ---- diff --git a/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc b/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc new file mode 100644 index 000000000..c14704b5a --- /dev/null +++ b/docs/examples/828f0045747fde4888a947bb99e190e3.asciidoc @@ -0,0 +1,29 @@ +// This file is autogenerated, DO NOT EDIT +// search/retriever.asciidoc:601 + +[source, python] +---- +resp = client.search( + index="movies", + retriever={ + "rule": { + "match_criteria": { + "query_string": "harry potter" + }, + "ruleset_ids": [ + "my-ruleset" + ], + "retriever": { + "standard": { + "query": { + "query_string": { + "query": "harry potter" + } + } + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc b/docs/examples/8417d8d35ec5fc5665dfb2f95d6d1101.asciidoc similarity index 92% rename from docs/examples/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc rename to docs/examples/8417d8d35ec5fc5665dfb2f95d6d1101.asciidoc index f342a73d5..b772d4988 100644 --- a/docs/examples/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc +++ b/docs/examples/8417d8d35ec5fc5665dfb2f95d6d1101.asciidoc @@ -17,7 +17,7 @@ resp = client.search( { "range": { "result.execution_time": { - "from": "now-10s" + "gte": "now-10s" } } } diff --git a/docs/examples/84237aa9da49ab4b4c4e2b21d2548df2.asciidoc b/docs/examples/84237aa9da49ab4b4c4e2b21d2548df2.asciidoc index 17a2d2fcc..ca3a5b11e 100644 --- a/docs/examples/84237aa9da49ab4b4c4e2b21d2548df2.asciidoc +++ b/docs/examples/84237aa9da49ab4b4c4e2b21d2548df2.asciidoc @@ -3,9 +3,8 @@ [source, python] ---- -resp = client.snapshot.create( - repository="my_repository", - snapshot="_verify_integrity", +resp = client.snapshot.repository_verify_integrity( + name="my_repository", ) print(resp) ---- diff --git a/docs/examples/84243213614fe64930b1d430704afb29.asciidoc b/docs/examples/84243213614fe64930b1d430704afb29.asciidoc index 15574d907..ab64c7049 100644 --- a/docs/examples/84243213614fe64930b1d430704afb29.asciidoc +++ b/docs/examples/84243213614fe64930b1d430704afb29.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1016 +// mapping/runtime.asciidoc:1014 [source, python] ---- diff --git a/docs/examples/84c69fb07050f0e89720007a6507a221.asciidoc b/docs/examples/84c69fb07050f0e89720007a6507a221.asciidoc index c46ae806d..e89a8c84b 100644 --- a/docs/examples/84c69fb07050f0e89720007a6507a221.asciidoc +++ b/docs/examples/84c69fb07050f0e89720007a6507a221.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/high-cpu-usage.asciidoc:95 +// troubleshooting/common-issues/high-cpu-usage.asciidoc:114 [source, python] ---- diff --git a/docs/examples/84ef9fe951c6d3caa7438238a5b23319.asciidoc b/docs/examples/84ef9fe951c6d3caa7438238a5b23319.asciidoc new file mode 100644 index 000000000..0ece7ba7c --- /dev/null +++ b/docs/examples/84ef9fe951c6d3caa7438238a5b23319.asciidoc @@ -0,0 +1,15 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:487 + +[source, python] +---- +resp = client.search( + index="cooking_blog", + query={ + "term": { + "author.keyword": "Maria Rodriguez" + } + }, +) +print(resp) +---- diff --git a/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc b/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc new file mode 100644 index 000000000..70473d84b --- /dev/null +++ b/docs/examples/853fc710cea79fb4e1a85fb6d149f9c5.asciidoc @@ -0,0 +1,44 @@ +// This file is autogenerated, DO NOT EDIT +// search/retriever.asciidoc:640 + +[source, python] +---- +resp = client.search( + index="movies", + retriever={ + "rule": { + "match_criteria": { + "query_string": "harry potter" + }, + "ruleset_ids": [ + "my-ruleset" + ], + "retriever": { + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "query_string": { + "query": "sorcerer's stone" + } + } + } + }, + { + "standard": { + "query": { + "query_string": { + "query": "chamber of secrets" + } + } + } + } + ] + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/8566f5ecf4ae14802ba63c8cc7c629f8.asciidoc b/docs/examples/8566f5ecf4ae14802ba63c8cc7c629f8.asciidoc index dfffb62b0..cf1c0fa6c 100644 --- a/docs/examples/8566f5ecf4ae14802ba63c8cc7c629f8.asciidoc +++ b/docs/examples/8566f5ecf4ae14802ba63c8cc7c629f8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// tab-widgets/inference-api/infer-api-task.asciidoc:208 +// tab-widgets/inference-api/infer-api-task.asciidoc:216 [source, python] ---- diff --git a/docs/examples/8593715fcc70315a0816b435551258e0.asciidoc b/docs/examples/8593715fcc70315a0816b435551258e0.asciidoc index d3df5ebad..743b90211 100644 --- a/docs/examples/8593715fcc70315a0816b435551258e0.asciidoc +++ b/docs/examples/8593715fcc70315a0816b435551258e0.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/semantic-text.asciidoc:155 +// mapping/types/semantic-text.asciidoc:185 [source, python] ---- diff --git a/docs/examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc b/docs/examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc new file mode 100644 index 000000000..b7610f139 --- /dev/null +++ b/docs/examples/85f9fc6f98e8573efed9b034e853d5ae.asciidoc @@ -0,0 +1,17 @@ +// This file is autogenerated, DO NOT EDIT +// inference/service-elasticsearch.asciidoc:248 + +[source, python] +---- +resp = client.inference.put( + task_type="sparse_embedding", + inference_id="use_existing_deployment", + inference_config={ + "service": "elasticsearch", + "service_settings": { + "deployment_id": ".elser_model_2" + } + }, +) +print(resp) +---- diff --git a/docs/examples/8619bd17bbfe33490b1f277007f654db.asciidoc b/docs/examples/8619bd17bbfe33490b1f277007f654db.asciidoc index 57c7e9c05..03d8b42f7 100644 --- a/docs/examples/8619bd17bbfe33490b1f277007f654db.asciidoc +++ b/docs/examples/8619bd17bbfe33490b1f277007f654db.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-cohere.asciidoc:188 +// inference/service-cohere.asciidoc:208 [source, python] ---- diff --git a/docs/examples/861f5f61409dc87f3671293b87839ff7.asciidoc b/docs/examples/861f5f61409dc87f3671293b87839ff7.asciidoc index b5cbc6f3d..23dd310c0 100644 --- a/docs/examples/861f5f61409dc87f3671293b87839ff7.asciidoc +++ b/docs/examples/861f5f61409dc87f3671293b87839ff7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/stats.asciidoc:1450 +// cluster/stats.asciidoc:1533 [source, python] ---- diff --git a/docs/examples/87457bb3467484bec3e9df4e25942ba6.asciidoc b/docs/examples/87457bb3467484bec3e9df4e25942ba6.asciidoc index e2e6764d2..484399a22 100644 --- a/docs/examples/87457bb3467484bec3e9df4e25942ba6.asciidoc +++ b/docs/examples/87457bb3467484bec3e9df4e25942ba6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:225 +// esql/multivalued-fields.asciidoc:269 [source, python] ---- diff --git a/docs/examples/113ac8466084ee6ac4ed272e342dc468.asciidoc b/docs/examples/894fce12d8f0d01e4c4083885a0c0077.asciidoc similarity index 86% rename from docs/examples/113ac8466084ee6ac4ed272e342dc468.asciidoc rename to docs/examples/894fce12d8f0d01e4c4083885a0c0077.asciidoc index dde6989d5..2b80551c1 100644 --- a/docs/examples/113ac8466084ee6ac4ed272e342dc468.asciidoc +++ b/docs/examples/894fce12d8f0d01e4c4083885a0c0077.asciidoc @@ -11,7 +11,7 @@ resp = client.reindex( }, dest={ "index": "mistral-embeddings", - "pipeline": "mistral_embeddings" + "pipeline": "mistral_embeddings_pipeline" }, ) print(resp) diff --git a/docs/examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc b/docs/examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc index f670391bd..8a6c13fbf 100644 --- a/docs/examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc +++ b/docs/examples/8a1b6eae4893c5dd27b3d81fd8d70f5b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-search-inference.asciidoc:89 +// search/search-your-data/semantic-search-elser.asciidoc:157 [source, python] ---- diff --git a/docs/examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc b/docs/examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc new file mode 100644 index 000000000..55f7d68aa --- /dev/null +++ b/docs/examples/8b8b6aac2111b2d8b93758ac737e6543.asciidoc @@ -0,0 +1,31 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/fields/synthetic-source.asciidoc:231 + +[source, python] +---- +resp = client.indices.create( + index="idx_keep", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, + mappings={ + "properties": { + "path": { + "type": "object", + "synthetic_source_keep": "all" + }, + "ids": { + "type": "integer", + "synthetic_source_keep": "arrays" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc b/docs/examples/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc index 74dc43129..1c44b7e5c 100644 --- a/docs/examples/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc +++ b/docs/examples/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/set-connector-sync-job-error-api.asciidoc:56 +// connector/apis/set-connector-sync-job-error-api.asciidoc:57 [source, python] ---- diff --git a/docs/examples/8c92c5e87facbae8dc4f58376ec21815.asciidoc b/docs/examples/8c92c5e87facbae8dc4f58376ec21815.asciidoc index 1d0d3cbd6..144aad3e1 100644 --- a/docs/examples/8c92c5e87facbae8dc4f58376ec21815.asciidoc +++ b/docs/examples/8c92c5e87facbae8dc4f58376ec21815.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1040 +// mapping/runtime.asciidoc:1038 [source, python] ---- diff --git a/docs/examples/bdb671866e2f0195f8dfbdb7f20bf591.asciidoc b/docs/examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc similarity index 56% rename from docs/examples/bdb671866e2f0195f8dfbdb7f20bf591.asciidoc rename to docs/examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc index f398c9d7c..d27833994 100644 --- a/docs/examples/bdb671866e2f0195f8dfbdb7f20bf591.asciidoc +++ b/docs/examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-search-semantic-text.asciidoc:34 +// search/search-your-data/semantic-text-hybrid-search:20 [source, python] ---- @@ -9,7 +9,11 @@ resp = client.inference.put( inference_config={ "service": "elser", "service_settings": { - "num_allocations": 1, + "adaptive_allocations": { + "enabled": True, + "min_number_of_allocations": 3, + "max_number_of_allocations": 10 + }, "num_threads": 1 } }, diff --git a/docs/examples/8d05862be1f9e7edaba162b1888b5677.asciidoc b/docs/examples/8d05862be1f9e7edaba162b1888b5677.asciidoc new file mode 100644 index 000000000..0433809f5 --- /dev/null +++ b/docs/examples/8d05862be1f9e7edaba162b1888b5677.asciidoc @@ -0,0 +1,61 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:50 + +[source, python] +---- +resp = client.indices.put_mapping( + index="cooking_blog", + properties={ + "title": { + "type": "text", + "analyzer": "standard", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "description": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword" + } + } + }, + "author": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword" + } + } + }, + "date": { + "type": "date", + "format": "yyyy-MM-dd" + }, + "category": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword" + } + } + }, + "tags": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword" + } + } + }, + "rating": { + "type": "float" + } + }, +) +print(resp) +---- diff --git a/docs/examples/8d9b04f2a97f4229dec9e620126de049.asciidoc b/docs/examples/8d9b04f2a97f4229dec9e620126de049.asciidoc index 846594fa0..e175422ed 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:580 +// snapshot-restore/repository-s3.asciidoc:602 [source, python] ---- diff --git a/docs/examples/8de6fed6ba2b94ce6a12ce076be2b4d7.asciidoc b/docs/examples/8de6fed6ba2b94ce6a12ce076be2b4d7.asciidoc index 98d0c6ac7..30b9b54bb 100644 --- a/docs/examples/8de6fed6ba2b94ce6a12ce076be2b4d7.asciidoc +++ b/docs/examples/8de6fed6ba2b94ce6a12ce076be2b4d7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cat/segments.asciidoc:127 +// cat/segments.asciidoc:126 [source, python] ---- diff --git a/docs/examples/8e2bbef535fef688d397e60e09aefa7f.asciidoc b/docs/examples/8e2bbef535fef688d397e60e09aefa7f.asciidoc index b6b5fa22c..ad334ccf3 100644 --- a/docs/examples/8e2bbef535fef688d397e60e09aefa7f.asciidoc +++ b/docs/examples/8e2bbef535fef688d397e60e09aefa7f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/hotspotting.asciidoc:200 +// troubleshooting/common-issues/hotspotting.asciidoc:202 [source, python] ---- diff --git a/docs/examples/8e89fee0be6a436c4e3d7c152659c47e.asciidoc b/docs/examples/8e89fee0be6a436c4e3d7c152659c47e.asciidoc index 5d065d20d..30432d61e 100644 --- a/docs/examples/8e89fee0be6a436c4e3d7c152659c47e.asciidoc +++ b/docs/examples/8e89fee0be6a436c4e3d7c152659c47e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-scheduling-api.asciidoc:89 +// connector/apis/update-connector-scheduling-api.asciidoc:90 [source, python] ---- diff --git a/docs/examples/8f4a7f68f2ca3698abdf20026a2d8c5f.asciidoc b/docs/examples/8f4a7f68f2ca3698abdf20026a2d8c5f.asciidoc index 3567b8751..73ac49610 100644 --- a/docs/examples/8f4a7f68f2ca3698abdf20026a2d8c5f.asciidoc +++ b/docs/examples/8f4a7f68f2ca3698abdf20026a2d8c5f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/tasks.asciidoc:153 +// troubleshooting/common-issues/high-cpu-usage.asciidoc:77 [source, python] ---- diff --git a/docs/examples/90083d93e46fad2524755b8d4d1306fc.asciidoc b/docs/examples/90083d93e46fad2524755b8d4d1306fc.asciidoc index f2fd9f349..dfe32a284 100644 --- a/docs/examples/90083d93e46fad2524755b8d4d1306fc.asciidoc +++ b/docs/examples/90083d93e46fad2524755b8d4d1306fc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/set-connector-sync-job-stats-api.asciidoc:74 +// connector/apis/set-connector-sync-job-stats-api.asciidoc:75 [source, python] ---- diff --git a/docs/examples/9138550002cb26ab64918cce427963b8.asciidoc b/docs/examples/9138550002cb26ab64918cce427963b8.asciidoc index ce568686c..10a10eebc 100644 --- a/docs/examples/9138550002cb26ab64918cce427963b8.asciidoc +++ b/docs/examples/9138550002cb26ab64918cce427963b8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-index-template.asciidoc:268 +// indices/put-index-template.asciidoc:271 [source, python] ---- diff --git a/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc b/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc new file mode 100644 index 000000000..17091127e --- /dev/null +++ b/docs/examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc @@ -0,0 +1,43 @@ +// This file is autogenerated, DO NOT EDIT +// search/retriever.asciidoc:279 + +[source, python] +---- +resp = client.search( + index="restaurants", + retriever={ + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "multi_match": { + "query": "Austria", + "fields": [ + "city", + "region" + ] + } + } + } + }, + { + "knn": { + "field": "vector", + "query_vector": [ + 10, + 22, + 77 + ], + "k": 10, + "num_candidates": 10 + } + } + ], + "rank_constant": 1, + "rank_window_size": 50 + } + }, +) +print(resp) +---- diff --git a/docs/examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc b/docs/examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc index 5c64ffb1a..5983ceb0a 100644 --- a/docs/examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc +++ b/docs/examples/927b20a221f975b75d1227b67d0eb7e2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:265 +// esql/esql-rest.asciidoc:267 [source, python] ---- diff --git a/docs/examples/92fa6608673cec5a2ed568a07e80d36b.asciidoc b/docs/examples/92fa6608673cec5a2ed568a07e80d36b.asciidoc index a109e86cc..d82a846d5 100644 --- a/docs/examples/92fa6608673cec5a2ed568a07e80d36b.asciidoc +++ b/docs/examples/92fa6608673cec5a2ed568a07e80d36b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1551 +// mapping/runtime.asciidoc:1549 [source, python] ---- diff --git a/docs/examples/9313f534e1aa266cde7d4af74665497f.asciidoc b/docs/examples/9313f534e1aa266cde7d4af74665497f.asciidoc new file mode 100644 index 000000000..8be94a953 --- /dev/null +++ b/docs/examples/9313f534e1aa266cde7d4af74665497f.asciidoc @@ -0,0 +1,13 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-zoom.asciidoc:219 + +[source, python] +---- +resp = client.connector.put( + connector_id="my-{service-name-stub}-connector", + index_name="my-elasticsearch-index", + name="Content synced from {service-name}", + service_type="{service-name-stub}", +) +print(resp) +---- diff --git a/docs/examples/935566d5426d44ade486a49ec5289741.asciidoc b/docs/examples/935566d5426d44ade486a49ec5289741.asciidoc index 9b2c52446..920cadc2f 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-search-semantic-text.asciidoc:128 +// search/search-your-data/semantic-text-hybrid-search:113 [source, python] ---- diff --git a/docs/examples/9382f022086c692ba05efb0acae65946.asciidoc b/docs/examples/9382f022086c692ba05efb0acae65946.asciidoc index e93dffce6..782786730 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:59 +// mapping/fields/synthetic-source.asciidoc:70 [source, python] ---- diff --git a/docs/examples/95414139c7b1203e3c2d99a354415801.asciidoc b/docs/examples/95414139c7b1203e3c2d99a354415801.asciidoc index 711c56dca..54d9b2266 100644 --- a/docs/examples/95414139c7b1203e3c2d99a354415801.asciidoc +++ b/docs/examples/95414139c7b1203e3c2d99a354415801.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cat/recovery.asciidoc:84 +// cat/recovery.asciidoc:83 [source, python] ---- diff --git a/docs/examples/7e5bee18e61d950e823782da1b733903.asciidoc b/docs/examples/968fb5b92aa65af09544f7c002b0953e.asciidoc similarity index 87% rename from docs/examples/7e5bee18e61d950e823782da1b733903.asciidoc rename to docs/examples/968fb5b92aa65af09544f7c002b0953e.asciidoc index 5fee705ec..134fe03d9 100644 --- a/docs/examples/7e5bee18e61d950e823782da1b733903.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:173 +// search/search-your-data/semantic-search-semantic-text.asciidoc:185 [source, python] ---- @@ -7,7 +7,7 @@ resp = client.search( index="semantic-embeddings", query={ "semantic": { - "field": "semantic_text", + "field": "content", "query": "How to avoid muscle soreness while running?" } }, diff --git a/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc b/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc new file mode 100644 index 000000000..ffc1c6da8 --- /dev/null +++ b/docs/examples/971fd23adb81bb5842c7750e0379336a.asciidoc @@ -0,0 +1,26 @@ +// This file is autogenerated, DO NOT EDIT +// search/retriever.asciidoc:528 + +[source, python] +---- +resp = client.search( + index="movies", + retriever={ + "text_similarity_reranker": { + "retriever": { + "standard": { + "query": { + "match": { + "genre": "drama" + } + } + } + }, + "field": "plot", + "inference_id": "my-msmarco-minilm-model", + "inference_text": "films that explore psychological depths" + } + }, +) +print(resp) +---- diff --git a/docs/examples/986f892bfa4dfdf1da8455fdf84a4b0c.asciidoc b/docs/examples/986f892bfa4dfdf1da8455fdf84a4b0c.asciidoc index 627cbc6bb..07f78c0cd 100644 --- a/docs/examples/986f892bfa4dfdf1da8455fdf84a4b0c.asciidoc +++ b/docs/examples/986f892bfa4dfdf1da8455fdf84a4b0c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-alibabacloud-ai-search.asciidoc:136 +// inference/service-alibabacloud-ai-search.asciidoc:222 [source, python] ---- diff --git a/docs/examples/99160b7c3c3fc1fac98aeb426dbcb3cb.asciidoc b/docs/examples/99160b7c3c3fc1fac98aeb426dbcb3cb.asciidoc index f50ea9075..c20218f95 100644 --- a/docs/examples/99160b7c3c3fc1fac98aeb426dbcb3cb.asciidoc +++ b/docs/examples/99160b7c3c3fc1fac98aeb426dbcb3cb.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// scripting/fields.asciidoc:171 +// scripting/fields.asciidoc:244 [source, python] ---- diff --git a/docs/examples/99803d7b111b862c0c82e9908e549b16.asciidoc b/docs/examples/99803d7b111b862c0c82e9908e549b16.asciidoc index ceee23cce..3c30cc23d 100644 --- a/docs/examples/99803d7b111b862c0c82e9908e549b16.asciidoc +++ b/docs/examples/99803d7b111b862c0c82e9908e549b16.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-mistral.asciidoc:87 +// inference/service-mistral.asciidoc:107 [source, python] ---- diff --git a/docs/examples/998c8479c8704bca0e121d5969859517.asciidoc b/docs/examples/998c8479c8704bca0e121d5969859517.asciidoc new file mode 100644 index 000000000..c7501ec38 --- /dev/null +++ b/docs/examples/998c8479c8704bca0e121d5969859517.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-API-tutorial.asciidoc:417 + +[source, python] +---- +resp = client.count( + index="music", +) +print(resp) +---- diff --git a/docs/examples/9a05cc10eea1251e23b82a4549913536.asciidoc b/docs/examples/9a05cc10eea1251e23b82a4549913536.asciidoc index 29eb24242..fde02f78f 100644 --- a/docs/examples/9a05cc10eea1251e23b82a4549913536.asciidoc +++ b/docs/examples/9a05cc10eea1251e23b82a4549913536.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/hotspotting.asciidoc:102 +// troubleshooting/common-issues/hotspotting.asciidoc:104 [source, python] ---- diff --git a/docs/examples/9a203aae3e1412d919546276fb52a5ca.asciidoc b/docs/examples/9a203aae3e1412d919546276fb52a5ca.asciidoc index 57789d3dd..8c93ab505 100644 --- a/docs/examples/9a203aae3e1412d919546276fb52a5ca.asciidoc +++ b/docs/examples/9a203aae3e1412d919546276fb52a5ca.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-cohere.asciidoc:170 +// inference/service-cohere.asciidoc:190 [source, python] ---- diff --git a/docs/examples/9ad0864bcd665b63551e944653d32423.asciidoc b/docs/examples/9ad0864bcd665b63551e944653d32423.asciidoc new file mode 100644 index 000000000..a6d007b6a --- /dev/null +++ b/docs/examples/9ad0864bcd665b63551e944653d32423.asciidoc @@ -0,0 +1,35 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/semantic-text-hybrid-search:155 + +[source, python] +---- +resp = client.search( + index="semantic-embeddings", + retriever={ + "rrf": { + "retrievers": [ + { + "standard": { + "query": { + "match": { + "content": "How to avoid muscle soreness while running?" + } + } + } + }, + { + "standard": { + "query": { + "semantic": { + "field": "semantic_text", + "query": "How to avoid muscle soreness while running?" + } + } + } + } + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/9ae268058c0ea32ef8926568e011c728.asciidoc b/docs/examples/9ae268058c0ea32ef8926568e011c728.asciidoc index f0c74cd8a..d885d8879 100644 --- a/docs/examples/9ae268058c0ea32ef8926568e011c728.asciidoc +++ b/docs/examples/9ae268058c0ea32ef8926568e011c728.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-features-api.asciidoc:122 +// connector/apis/update-connector-features-api.asciidoc:123 [source, python] ---- diff --git a/docs/examples/2cd8439db5054c93c49f1bf50433e1bb.asciidoc b/docs/examples/9aedc45f83e022732789e8d796f5a43c.asciidoc similarity index 96% rename from docs/examples/2cd8439db5054c93c49f1bf50433e1bb.asciidoc rename to docs/examples/9aedc45f83e022732789e8d796f5a43c.asciidoc index 2b48fd10d..3d8050779 100644 --- a/docs/examples/2cd8439db5054c93c49f1bf50433e1bb.asciidoc +++ b/docs/examples/9aedc45f83e022732789e8d796f5a43c.asciidoc @@ -4,7 +4,6 @@ [source, python] ---- resp = client.cluster.reroute( - metric="none", commands=[ { "move": { diff --git a/docs/examples/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc b/docs/examples/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc index bb2afba6c..34e4efa64 100644 --- a/docs/examples/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc +++ b/docs/examples/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/cancel-connector-sync-job-api.asciidoc:50 +// connector/apis/cancel-connector-sync-job-api.asciidoc:51 [source, python] ---- diff --git a/docs/examples/9bd5a470ee6d2b4a1f5280adc39675d2.asciidoc b/docs/examples/9bd5a470ee6d2b4a1f5280adc39675d2.asciidoc new file mode 100644 index 000000000..404ca1548 --- /dev/null +++ b/docs/examples/9bd5a470ee6d2b4a1f5280adc39675d2.asciidoc @@ -0,0 +1,35 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-mysql.asciidoc:503 + +[source, python] +---- +resp = client.update( + index=".elastic-connectors", + id="connector_id", + doc={ + "configuration": { + "tables": { + "type": "list", + "value": "*" + }, + "ssl_enabled": { + "type": "bool", + "value": False + }, + "ssl_ca": { + "type": "str", + "value": "" + }, + "fetch_size": { + "type": "int", + "value": 50 + }, + "retry_count": { + "type": "int", + "value": 3 + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/9c021836acf7c0370e289f611325868d.asciidoc b/docs/examples/9c021836acf7c0370e289f611325868d.asciidoc index 9fc291d61..81f2363e6 100644 --- a/docs/examples/9c021836acf7c0370e289f611325868d.asciidoc +++ b/docs/examples/9c021836acf7c0370e289f611325868d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-configuration-api.asciidoc:308 +// connector/apis/update-connector-configuration-api.asciidoc:309 [source, python] ---- diff --git a/docs/examples/5b86d54900e2c4c043a54ca7ae2df0f0.asciidoc b/docs/examples/9c2ce0132e4527077443f007d27b1158.asciidoc similarity index 67% rename from docs/examples/5b86d54900e2c4c043a54ca7ae2df0f0.asciidoc rename to docs/examples/9c2ce0132e4527077443f007d27b1158.asciidoc index 31492b541..64eb514f0 100644 --- a/docs/examples/5b86d54900e2c4c043a54ca7ae2df0f0.asciidoc +++ b/docs/examples/9c2ce0132e4527077443f007d27b1158.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/flattened.asciidoc:407 +// mapping/types/flattened.asciidoc:422 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "flattened": { "type": "flattened" diff --git a/docs/examples/9cb150d67dfa0947f29aa809bcc93c6e.asciidoc b/docs/examples/9cb150d67dfa0947f29aa809bcc93c6e.asciidoc index 6efd75246..ab22d2d4f 100644 --- a/docs/examples/9cb150d67dfa0947f29aa809bcc93c6e.asciidoc +++ b/docs/examples/9cb150d67dfa0947f29aa809bcc93c6e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// datatiers.asciidoc:241 +// datatiers.asciidoc:240 [source, python] ---- diff --git a/docs/examples/9cbb097e5498a9fde39e3b1d3b62a4d2.asciidoc b/docs/examples/9cbb097e5498a9fde39e3b1d3b62a4d2.asciidoc index 15d03e6ab..70dfa8833 100644 --- a/docs/examples/9cbb097e5498a9fde39e3b1d3b62a4d2.asciidoc +++ b/docs/examples/9cbb097e5498a9fde39e3b1d3b62a4d2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ml/trained-models/apis/infer-trained-model.asciidoc:945 +// ml/trained-models/apis/infer-trained-model.asciidoc:1046 [source, python] ---- diff --git a/docs/examples/9d396afad93782699d7a929578c85284.asciidoc b/docs/examples/9d396afad93782699d7a929578c85284.asciidoc index 5c4822152..e869a6a92 100644 --- a/docs/examples/9d396afad93782699d7a929578c85284.asciidoc +++ b/docs/examples/9d396afad93782699d7a929578c85284.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// tab-widgets/inference-api/infer-api-task.asciidoc:184 +// tab-widgets/inference-api/infer-api-task.asciidoc:192 [source, python] ---- diff --git a/docs/examples/9d66cb59711f24e6b4ff85608c9b5a1b.asciidoc b/docs/examples/9d66cb59711f24e6b4ff85608c9b5a1b.asciidoc new file mode 100644 index 000000000..dfe0eb762 --- /dev/null +++ b/docs/examples/9d66cb59711f24e6b4ff85608c9b5a1b.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// troubleshooting/common-issues/task-queue-backlog.asciidoc:51 + +[source, python] +---- +resp = client.tasks.list( + pretty=True, + human=True, + detailed=True, +) +print(resp) +---- diff --git a/docs/examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc b/docs/examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc index a05788985..f0d7cb7d0 100644 --- a/docs/examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc +++ b/docs/examples/9de4edafd22a8b9cb557632b2c8779cd.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:306 +// esql/esql-rest.asciidoc:308 [source, python] ---- diff --git a/docs/examples/9f16fca9813304e398ee052aa857dbcd.asciidoc b/docs/examples/9f16fca9813304e398ee052aa857dbcd.asciidoc index f56b0349b..ecef289d9 100644 --- a/docs/examples/9f16fca9813304e398ee052aa857dbcd.asciidoc +++ b/docs/examples/9f16fca9813304e398ee052aa857dbcd.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-openai.asciidoc:121 +// inference/service-openai.asciidoc:141 [source, python] ---- diff --git a/docs/examples/9f3341489fefd38c4e439c29f6dcb86c.asciidoc b/docs/examples/9f3341489fefd38c4e439c29f6dcb86c.asciidoc index 76040c776..f73aece74 100644 --- a/docs/examples/9f3341489fefd38c4e439c29f6dcb86c.asciidoc +++ b/docs/examples/9f3341489fefd38c4e439c29f6dcb86c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/terms-set-query.asciidoc:214 +// query-dsl/terms-set-query.asciidoc:224 [source, python] ---- diff --git a/docs/examples/a1070cf2f5969d42d71cda057223f152.asciidoc b/docs/examples/a1070cf2f5969d42d71cda057223f152.asciidoc index 5c00da449..2de683ba9 100644 --- a/docs/examples/a1070cf2f5969d42d71cda057223f152.asciidoc +++ b/docs/examples/a1070cf2f5969d42d71cda057223f152.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:247 +// how-to/size-your-shards.asciidoc:248 [source, python] ---- diff --git a/docs/examples/f38262ef72f73816ec35fa4c9c85760d.asciidoc b/docs/examples/a1b668795243398f5bc40bcc9bead884.asciidoc similarity index 81% rename from docs/examples/f38262ef72f73816ec35fa4c9c85760d.asciidoc rename to docs/examples/a1b668795243398f5bc40bcc9bead884.asciidoc index 9de3a3deb..56d50d1b9 100644 --- a/docs/examples/f38262ef72f73816ec35fa4c9c85760d.asciidoc +++ b/docs/examples/a1b668795243398f5bc40bcc9bead884.asciidoc @@ -5,10 +5,16 @@ ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "my_range": { "type": "long_range" diff --git a/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc b/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc new file mode 100644 index 000000000..a603b404b --- /dev/null +++ b/docs/examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc @@ -0,0 +1,28 @@ +// This file is autogenerated, DO NOT EDIT +// search/retriever.asciidoc:448 + +[source, python] +---- +resp = client.search( + index="index", + retriever={ + "text_similarity_reranker": { + "retriever": { + "standard": { + "query": { + "match_phrase": { + "text": "landmark in Paris" + } + } + } + }, + "field": "text", + "inference_id": "my-cohere-rerank-model", + "inference_text": "Most famous landmark in Paris", + "rank_window_size": 100, + "min_score": 0.5 + } + }, +) +print(resp) +---- diff --git a/docs/examples/a2b2ce031120dac49b5120b26eea8758.asciidoc b/docs/examples/a2b2ce031120dac49b5120b26eea8758.asciidoc index d90984516..4a33279d1 100644 --- a/docs/examples/a2b2ce031120dac49b5120b26eea8758.asciidoc +++ b/docs/examples/a2b2ce031120dac49b5120b26eea8758.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cat/indices.asciidoc:109 +// cat/indices.asciidoc:113 [source, python] ---- diff --git a/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc b/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc new file mode 100644 index 000000000..67acc59e9 --- /dev/null +++ b/docs/examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc @@ -0,0 +1,32 @@ +// This file is autogenerated, DO NOT EDIT +// search/retriever.asciidoc:144 + +[source, python] +---- +resp = client.search( + index="restaurants", + retriever={ + "standard": { + "query": { + "bool": { + "should": [ + { + "match": { + "region": "Austria" + } + } + ], + "filter": [ + { + "term": { + "year": "2019" + } + } + ] + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/a3779f21f132787c48681bfb50453592.asciidoc b/docs/examples/a3779f21f132787c48681bfb50453592.asciidoc new file mode 100644 index 000000000..6b0436b24 --- /dev/null +++ b/docs/examples/a3779f21f132787c48681bfb50453592.asciidoc @@ -0,0 +1,34 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/processors/ip-location.asciidoc:85 + +[source, python] +---- +resp = client.ingest.put_pipeline( + id="ip_location", + description="Add ip geolocation info", + processors=[ + { + "ip_location": { + "field": "ip" + } + } + ], +) +print(resp) + +resp1 = client.index( + index="my-index-000001", + id="my_id", + pipeline="ip_location", + document={ + "ip": "89.160.20.128" + }, +) +print(resp1) + +resp2 = client.get( + index="my-index-000001", + id="my_id", +) +print(resp2) +---- diff --git a/docs/examples/a4a3c3cd09efa75168dab90105afb2e9.asciidoc b/docs/examples/a4a3c3cd09efa75168dab90105afb2e9.asciidoc index cc4db4e1d..bcd4b081f 100644 --- a/docs/examples/a4a3c3cd09efa75168dab90105afb2e9.asciidoc +++ b/docs/examples/a4a3c3cd09efa75168dab90105afb2e9.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/get-inference.asciidoc:73 +// inference/get-inference.asciidoc:68 [source, python] ---- diff --git a/docs/examples/a4ee2214d621bcfaf768c46d21325958.asciidoc b/docs/examples/a4ee2214d621bcfaf768c46d21325958.asciidoc index 7c2c97f72..b00e53429 100644 --- a/docs/examples/a4ee2214d621bcfaf768c46d21325958.asciidoc +++ b/docs/examples/a4ee2214d621bcfaf768c46d21325958.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// tab-widgets/inference-api/infer-api-task.asciidoc:66 +// tab-widgets/inference-api/infer-api-task.asciidoc:74 [source, python] ---- diff --git a/docs/examples/a594f05459d9eecc8050c73fc8da336f.asciidoc b/docs/examples/a594f05459d9eecc8050c73fc8da336f.asciidoc index c714c6bd4..60d534ece 100644 --- a/docs/examples/a594f05459d9eecc8050c73fc8da336f.asciidoc +++ b/docs/examples/a594f05459d9eecc8050c73fc8da336f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// tab-widgets/inference-api/infer-api-task.asciidoc:121 +// tab-widgets/inference-api/infer-api-task.asciidoc:129 [source, python] ---- diff --git a/docs/examples/14a49c13c399840e64c00b487aa820c9.asciidoc b/docs/examples/a5aeb2c8bdf91f6146026ec8edc476b6.asciidoc similarity index 67% rename from docs/examples/14a49c13c399840e64c00b487aa820c9.asciidoc rename to docs/examples/a5aeb2c8bdf91f6146026ec8edc476b6.asciidoc index 733cdfc77..48329183c 100644 --- a/docs/examples/14a49c13c399840e64c00b487aa820c9.asciidoc +++ b/docs/examples/a5aeb2c8bdf91f6146026ec8edc476b6.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/date_nanos.asciidoc:160 +// mapping/types/date_nanos.asciidoc:155 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "date": { "type": "date_nanos" diff --git a/docs/examples/a75765e3fb130421dde6c3c2f12e8acb.asciidoc b/docs/examples/a75765e3fb130421dde6c3c2f12e8acb.asciidoc index 4642ae26e..aff792fea 100644 --- a/docs/examples/a75765e3fb130421dde6c3c2f12e8acb.asciidoc +++ b/docs/examples/a75765e3fb130421dde6c3c2f12e8acb.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/claim-connector-sync-job-api.asciidoc:62 +// connector/apis/claim-connector-sync-job-api.asciidoc:63 [source, python] ---- diff --git a/docs/examples/82eff1d681a5d0d1538ef011bb32ab9a.asciidoc b/docs/examples/a769d696bf12f5e9de4b3250646d250c.asciidoc similarity index 83% rename from docs/examples/82eff1d681a5d0d1538ef011bb32ab9a.asciidoc rename to docs/examples/a769d696bf12f5e9de4b3250646d250c.asciidoc index 87c70a6f3..dff590d07 100644 --- a/docs/examples/82eff1d681a5d0d1538ef011bb32ab9a.asciidoc +++ b/docs/examples/a769d696bf12f5e9de4b3250646d250c.asciidoc @@ -11,7 +11,7 @@ resp = client.reindex( }, dest={ "index": "alibabacloud-ai-search-embeddings", - "pipeline": "alibabacloud_ai_search_embeddings" + "pipeline": "alibabacloud_ai_search_embeddings_pipeline" }, ) print(resp) diff --git a/docs/examples/2826510e4aeb1c0d8dc43d317ed7624a.asciidoc b/docs/examples/a7d814caf2a995d2aeadecc3495011be.asciidoc similarity index 67% rename from docs/examples/2826510e4aeb1c0d8dc43d317ed7624a.asciidoc rename to docs/examples/a7d814caf2a995d2aeadecc3495011be.asciidoc index 088c4262a..5801198e8 100644 --- a/docs/examples/2826510e4aeb1c0d8dc43d317ed7624a.asciidoc +++ b/docs/examples/a7d814caf2a995d2aeadecc3495011be.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/boolean.asciidoc:249 +// mapping/types/boolean.asciidoc:248 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "bool": { "type": "boolean" diff --git a/docs/examples/794d9a321b944347d2a8834a07b5eb22.asciidoc b/docs/examples/a8dff54362184b2732b9bd248cf6df8a.asciidoc similarity index 66% rename from docs/examples/794d9a321b944347d2a8834a07b5eb22.asciidoc rename to docs/examples/a8dff54362184b2732b9bd248cf6df8a.asciidoc index 45c76d191..2881a6771 100644 --- a/docs/examples/794d9a321b944347d2a8834a07b5eb22.asciidoc +++ b/docs/examples/a8dff54362184b2732b9bd248cf6df8a.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/range.asciidoc:394 +// mapping/types/range.asciidoc:418 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "my_range": { "type": "integer_range" diff --git a/docs/examples/a9280b55a7284952f604ec7bece712f6.asciidoc b/docs/examples/a9280b55a7284952f604ec7bece712f6.asciidoc index 2b8beb63d..b67cae301 100644 --- a/docs/examples/a9280b55a7284952f604ec7bece712f6.asciidoc +++ b/docs/examples/a9280b55a7284952f604ec7bece712f6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1188 +// mapping/runtime.asciidoc:1186 [source, python] ---- diff --git a/docs/examples/0ba5acede9d43af424e85428e7d35420.asciidoc b/docs/examples/a95ae76fca7c3e273e4bd10323b3caa6.asciidoc similarity index 91% rename from docs/examples/0ba5acede9d43af424e85428e7d35420.asciidoc rename to docs/examples/a95ae76fca7c3e273e4bd10323b3caa6.asciidoc index b1c6f894b..20be5e1e3 100644 --- a/docs/examples/0ba5acede9d43af424e85428e7d35420.asciidoc +++ b/docs/examples/a95ae76fca7c3e273e4bd10323b3caa6.asciidoc @@ -4,7 +4,7 @@ [source, python] ---- resp = client.ingest.put_pipeline( - id="azure_openai_embeddings", + id="azure_openai_embeddings_pipeline", processors=[ { "inference": { diff --git a/docs/examples/a960b43e720b4934edb74ab4b085ca77.asciidoc b/docs/examples/a960b43e720b4934edb74ab4b085ca77.asciidoc index 6bf107489..d55601076 100644 --- a/docs/examples/a960b43e720b4934edb74ab4b085ca77.asciidoc +++ b/docs/examples/a960b43e720b4934edb74ab4b085ca77.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/list-connectors-api.asciidoc:78 +// connector/apis/list-connectors-api.asciidoc:79 [source, python] ---- diff --git a/docs/examples/a999b5661bebb802bbbfe04faacf1971.asciidoc b/docs/examples/a999b5661bebb802bbbfe04faacf1971.asciidoc index b8c02fe91..77df3aaa7 100644 --- a/docs/examples/a999b5661bebb802bbbfe04faacf1971.asciidoc +++ b/docs/examples/a999b5661bebb802bbbfe04faacf1971.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:510 +// how-to/size-your-shards.asciidoc:511 [source, python] ---- diff --git a/docs/examples/aa676d54a59dee87ecd28bcc1edce59b.asciidoc b/docs/examples/aa676d54a59dee87ecd28bcc1edce59b.asciidoc index f921fe239..1e934487f 100644 --- a/docs/examples/aa676d54a59dee87ecd28bcc1edce59b.asciidoc +++ b/docs/examples/aa676d54a59dee87ecd28bcc1edce59b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-alibabacloud-ai-search.asciidoc:172 +// inference/service-alibabacloud-ai-search.asciidoc:186 [source, python] ---- diff --git a/docs/examples/aa814309ad5f1630886ba75255b444f5.asciidoc b/docs/examples/aa814309ad5f1630886ba75255b444f5.asciidoc new file mode 100644 index 000000000..d542f9477 --- /dev/null +++ b/docs/examples/aa814309ad5f1630886ba75255b444f5.asciidoc @@ -0,0 +1,8 @@ +// This file is autogenerated, DO NOT EDIT +// troubleshooting/common-issues/task-queue-backlog.asciidoc:80 + +[source, python] +---- +resp = client.cluster.pending_tasks() +print(resp) +---- diff --git a/docs/examples/aab810de3314d5e11bd564ea096785b8.asciidoc b/docs/examples/aab810de3314d5e11bd564ea096785b8.asciidoc new file mode 100644 index 000000000..0fb61ac72 --- /dev/null +++ b/docs/examples/aab810de3314d5e11bd564ea096785b8.asciidoc @@ -0,0 +1,21 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:428 + +[source, python] +---- +resp = client.search( + index="cooking_blog", + query={ + "bool": { + "filter": [ + { + "term": { + "category.keyword": "Breakfast" + } + } + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/aaba346e0becdf12db13658296e0b8a1.asciidoc b/docs/examples/aaba346e0becdf12db13658296e0b8a1.asciidoc index e775fb30d..7a2fb484b 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:38 +// ilm/error-handling.asciidoc:41 [source, python] ---- diff --git a/docs/examples/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc b/docs/examples/aad7d80990a6a3c391ff555ce09ae9dc.asciidoc similarity index 65% rename from docs/examples/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc rename to docs/examples/aad7d80990a6a3c391ff555ce09ae9dc.asciidoc index 07bbf1dbd..adf825bb3 100644 --- a/docs/examples/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc +++ b/docs/examples/aad7d80990a6a3c391ff555ce09ae9dc.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/numeric.asciidoc:287 +// mapping/types/numeric.asciidoc:295 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "f": { "type": "scaled_float", diff --git a/docs/examples/ab24bfdfd8c1c7b3044b21a3b4684370.asciidoc b/docs/examples/ab24bfdfd8c1c7b3044b21a3b4684370.asciidoc index 3d433144a..538069d22 100644 --- a/docs/examples/ab24bfdfd8c1c7b3044b21a3b4684370.asciidoc +++ b/docs/examples/ab24bfdfd8c1c7b3044b21a3b4684370.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// scripting/fields.asciidoc:94 +// scripting/fields.asciidoc:167 [source, python] ---- diff --git a/docs/examples/f9cb2547ab04461a12bfd25a35be5f96.asciidoc b/docs/examples/ac5b91aa75696f9880451c9439fd9eec.asciidoc similarity index 73% rename from docs/examples/f9cb2547ab04461a12bfd25a35be5f96.asciidoc rename to docs/examples/ac5b91aa75696f9880451c9439fd9eec.asciidoc index ebf203e52..84f62b3bf 100644 --- a/docs/examples/f9cb2547ab04461a12bfd25a35be5f96.asciidoc +++ b/docs/examples/ac5b91aa75696f9880451c9439fd9eec.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/range.asciidoc:429 +// mapping/types/range.asciidoc:461 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "my_range": { "type": "date_range" diff --git a/docs/examples/ac9fe9b64891095bcf84066f719b3dc4.asciidoc b/docs/examples/ac9fe9b64891095bcf84066f719b3dc4.asciidoc index 2b0c50721..c65434081 100644 --- a/docs/examples/ac9fe9b64891095bcf84066f719b3dc4.asciidoc +++ b/docs/examples/ac9fe9b64891095bcf84066f719b3dc4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// snapshot-restore/repository-source-only.asciidoc:38 +// snapshot-restore/repository-source-only.asciidoc:41 [source, python] ---- diff --git a/docs/examples/8f0a3d7b5fbdf5351750a23c493cc078.asciidoc b/docs/examples/acc44366a9908684b2c8c2b119a4fb2b.asciidoc similarity index 56% rename from docs/examples/8f0a3d7b5fbdf5351750a23c493cc078.asciidoc rename to docs/examples/acc44366a9908684b2c8c2b119a4fb2b.asciidoc index 769097bfb..daf9f50cf 100644 --- a/docs/examples/8f0a3d7b5fbdf5351750a23c493cc078.asciidoc +++ b/docs/examples/acc44366a9908684b2c8c2b119a4fb2b.asciidoc @@ -1,15 +1,19 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/search-using-query-rules.asciidoc:200 +// search/search-your-data/search-using-query-rules.asciidoc:202 [source, python] ---- resp = client.search( index="my-index-000001", - query={ + retriever={ "rule": { - "organic": { - "query_string": { - "query": "puggles" + "retriever": { + "standard": { + "query": { + "query_string": { + "query": "puggles" + } + } } }, "match_criteria": { diff --git a/docs/examples/add82cbe7cd95c4be5ce1c9958f2f208.asciidoc b/docs/examples/add82cbe7cd95c4be5ce1c9958f2f208.asciidoc new file mode 100644 index 000000000..a6715d19e --- /dev/null +++ b/docs/examples/add82cbe7cd95c4be5ce1c9958f2f208.asciidoc @@ -0,0 +1,20 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:335 + +[source, python] +---- +resp = client.search( + index="cooking_blog", + query={ + "multi_match": { + "query": "vegetarian curry", + "fields": [ + "title^3", + "description^2", + "tags" + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc b/docs/examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc new file mode 100644 index 000000000..262513d43 --- /dev/null +++ b/docs/examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc @@ -0,0 +1,14 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-zoom.asciidoc:60 + +[source, python] +---- +resp = client.connector.put( + connector_id="my-{service-name-stub}-connector", + index_name="my-elasticsearch-index", + name="Content synced from {service-name}", + service_type="{service-name-stub}", + is_native=True, +) +print(resp) +---- diff --git a/docs/examples/afef5cac988592b97ae289ab39c2f437.asciidoc b/docs/examples/afef5cac988592b97ae289ab39c2f437.asciidoc index b669c17e3..681761170 100644 --- a/docs/examples/afef5cac988592b97ae289ab39c2f437.asciidoc +++ b/docs/examples/afef5cac988592b97ae289ab39c2f437.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/text.asciidoc:295 +// mapping/types/text.asciidoc:307 [source, python] ---- diff --git a/docs/examples/b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc b/docs/examples/b0ee6f19875fe5bad8aab02d60e3532c.asciidoc similarity index 85% rename from docs/examples/b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc rename to docs/examples/b0ee6f19875fe5bad8aab02d60e3532c.asciidoc index 8a8e061a5..610238476 100644 --- a/docs/examples/b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc +++ b/docs/examples/b0ee6f19875fe5bad8aab02d60e3532c.asciidoc @@ -1,11 +1,11 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/geoip.asciidoc:83 +// ingest/processors/geoip.asciidoc:85 [source, python] ---- resp = client.ingest.put_pipeline( id="geoip", - description="Add geoip info", + description="Add ip geolocation info", processors=[ { "geoip": { diff --git a/docs/examples/b0fe9a7c8e519995258786be4bef36c4.asciidoc b/docs/examples/b0fe9a7c8e519995258786be4bef36c4.asciidoc index 90b70da87..6ef842f01 100644 --- a/docs/examples/b0fe9a7c8e519995258786be4bef36c4.asciidoc +++ b/docs/examples/b0fe9a7c8e519995258786be4bef36c4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-search-inference.asciidoc:97 +// search/search-your-data/semantic-search-elser.asciidoc:170 [source, python] ---- diff --git a/docs/examples/b11a0675e49df0709be693297ca73a2c.asciidoc b/docs/examples/b11a0675e49df0709be693297ca73a2c.asciidoc index 8eab9b4d7..73aa660e5 100644 --- a/docs/examples/b11a0675e49df0709be693297ca73a2c.asciidoc +++ b/docs/examples/b11a0675e49df0709be693297ca73a2c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/info.asciidoc:193 +// rest-api/info.asciidoc:197 [source, python] ---- diff --git a/docs/examples/c1bb395546102279296534522061829f.asciidoc b/docs/examples/b3479ee4586c15020549afae58d94d65.asciidoc similarity index 71% rename from docs/examples/c1bb395546102279296534522061829f.asciidoc rename to docs/examples/b3479ee4586c15020549afae58d94d65.asciidoc index 2df09de38..2ae2dff35 100644 --- a/docs/examples/c1bb395546102279296534522061829f.asciidoc +++ b/docs/examples/b3479ee4586c15020549afae58d94d65.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/geo-point.asciidoc:229 +// mapping/types/geo-point.asciidoc:225 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "point": { "type": "geo_point" diff --git a/docs/examples/b3756e700d0f6c7e8919003bdf26bc8f.asciidoc b/docs/examples/b3756e700d0f6c7e8919003bdf26bc8f.asciidoc index 03ee84804..3f151a158 100644 --- a/docs/examples/b3756e700d0f6c7e8919003bdf26bc8f.asciidoc +++ b/docs/examples/b3756e700d0f6c7e8919003bdf26bc8f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/delete-desired-balance.asciidoc:21 +// troubleshooting/troubleshooting-unbalanced-cluster.asciidoc:72 [source, python] ---- diff --git a/docs/examples/36063ff9a318dba7bb0be3a230655dc8.asciidoc b/docs/examples/b3cd07f02059165fd62a2f148be3dc58.asciidoc similarity index 73% rename from docs/examples/36063ff9a318dba7bb0be3a230655dc8.asciidoc rename to docs/examples/b3cd07f02059165fd62a2f148be3dc58.asciidoc index 6ece85e77..be7f57a49 100644 --- a/docs/examples/36063ff9a318dba7bb0be3a230655dc8.asciidoc +++ b/docs/examples/b3cd07f02059165fd62a2f148be3dc58.asciidoc @@ -5,10 +5,16 @@ ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "long": { "type": "long" diff --git a/docs/examples/51390ca10aa22d7104e8970f09ea4512.asciidoc b/docs/examples/b3f442a7d9eb391121dcab991787f9d6.asciidoc similarity index 73% rename from docs/examples/51390ca10aa22d7104e8970f09ea4512.asciidoc rename to docs/examples/b3f442a7d9eb391121dcab991787f9d6.asciidoc index 83ee3f394..0f1dbf105 100644 --- a/docs/examples/51390ca10aa22d7104e8970f09ea4512.asciidoc +++ b/docs/examples/b3f442a7d9eb391121dcab991787f9d6.asciidoc @@ -5,10 +5,16 @@ ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "binary": { "type": "binary", diff --git a/docs/examples/b45a8c6fc746e9c90fd181e69a605fad.asciidoc b/docs/examples/b45a8c6fc746e9c90fd181e69a605fad.asciidoc index 9b704644e..93191cd7e 100644 --- a/docs/examples/b45a8c6fc746e9c90fd181e69a605fad.asciidoc +++ b/docs/examples/b45a8c6fc746e9c90fd181e69a605fad.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/post-inference.asciidoc:106 +// inference/post-inference.asciidoc:101 [source, python] ---- diff --git a/docs/examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc b/docs/examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc index 104cdbd91..b7d77e2f8 100644 --- a/docs/examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc +++ b/docs/examples/b583bf8d3a2f49d633aa2cfed5606418.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-component-template.asciidoc:186 +// indices/put-component-template.asciidoc:189 [source, python] ---- diff --git a/docs/examples/b6a6aa9ba20e9a019371ae268488833f.asciidoc b/docs/examples/b6a6aa9ba20e9a019371ae268488833f.asciidoc index 16ae792b9..7a0389714 100644 --- a/docs/examples/b6a6aa9ba20e9a019371ae268488833f.asciidoc +++ b/docs/examples/b6a6aa9ba20e9a019371ae268488833f.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// modules/cluster/remote-clusters-migration.asciidoc:96 +// modules/cluster/remote-clusters-migration.asciidoc:97 [source, python] ---- diff --git a/docs/examples/b6a7ffd2003c38f4aa321f067d162be5.asciidoc b/docs/examples/b6a7ffd2003c38f4aa321f067d162be5.asciidoc index 5bcfbbfb9..f75a30daa 100644 --- a/docs/examples/b6a7ffd2003c38f4aa321f067d162be5.asciidoc +++ b/docs/examples/b6a7ffd2003c38f4aa321f067d162be5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-search-elser.asciidoc:248 +// search/search-your-data/semantic-search-elser.asciidoc:260 [source, python] ---- diff --git a/docs/examples/b6f690896001f8f9ad5bf24e1304a552.asciidoc b/docs/examples/b6f690896001f8f9ad5bf24e1304a552.asciidoc index 9d4e68d83..5b63289c6 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:158 +// mapping/types/dense-vector.asciidoc:163 [source, python] ---- diff --git a/docs/examples/b8400dbe39215705060500f0e569f452.asciidoc b/docs/examples/b8400dbe39215705060500f0e569f452.asciidoc new file mode 100644 index 000000000..b2122a3d6 --- /dev/null +++ b/docs/examples/b8400dbe39215705060500f0e569f452.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-API-tutorial.asciidoc:312 + +[source, python] +---- +resp = client.connector.get( + connector_id="my-connector-id", +) +print(resp) +---- diff --git a/docs/examples/b9ba66209b7fcc111a7bcef0b3e00052.asciidoc b/docs/examples/b9ba66209b7fcc111a7bcef0b3e00052.asciidoc new file mode 100644 index 000000000..32a6c03a0 --- /dev/null +++ b/docs/examples/b9ba66209b7fcc111a7bcef0b3e00052.asciidoc @@ -0,0 +1,17 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/types/passthrough.asciidoc:77 + +[source, python] +---- +resp = client.index( + index="my-index-000001", + id="1", + document={ + "attributes": { + "id": "foo" + }, + "id": "bar" + }, +) +print(resp) +---- diff --git a/docs/examples/fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc b/docs/examples/ba650046f9063f6c43d76f47e0f94403.asciidoc similarity index 67% rename from docs/examples/fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc rename to docs/examples/ba650046f9063f6c43d76f47e0f94403.asciidoc index f6aaa06b4..9b94f645f 100644 --- a/docs/examples/fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc +++ b/docs/examples/ba650046f9063f6c43d76f47e0f94403.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/date.asciidoc:249 +// mapping/types/date.asciidoc:244 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "date": { "type": "date" diff --git a/docs/examples/bb5a67e3d2d9cd3016e487e627769fe8.asciidoc b/docs/examples/bb5a67e3d2d9cd3016e487e627769fe8.asciidoc new file mode 100644 index 000000000..94bea00eb --- /dev/null +++ b/docs/examples/bb5a67e3d2d9cd3016e487e627769fe8.asciidoc @@ -0,0 +1,105 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:129 + +[source, python] +---- +resp = client.bulk( + index="cooking_blog", + refresh="wait_for", + operations=[ + { + "index": { + "_id": "1" + } + }, + { + "title": "Perfect Pancakes: A Fluffy Breakfast Delight", + "description": "Learn the secrets to making the fluffiest pancakes, so amazing you won't believe your tastebuds. This recipe uses buttermilk and a special folding technique to create light, airy pancakes that are perfect for lazy Sunday mornings.", + "author": "Maria Rodriguez", + "date": "2023-05-01", + "category": "Breakfast", + "tags": [ + "pancakes", + "breakfast", + "easy recipes" + ], + "rating": 4.8 + }, + { + "index": { + "_id": "2" + } + }, + { + "title": "Spicy Thai Green Curry: A Vegetarian Adventure", + "description": "Dive into the flavors of Thailand with this vibrant green curry. Packed with vegetables and aromatic herbs, this dish is both healthy and satisfying. Don't worry about the heat - you can easily adjust the spice level to your liking.", + "author": "Liam Chen", + "date": "2023-05-05", + "category": "Main Course", + "tags": [ + "thai", + "vegetarian", + "curry", + "spicy" + ], + "rating": 4.6 + }, + { + "index": { + "_id": "3" + } + }, + { + "title": "Classic Beef Stroganoff: A Creamy Comfort Food", + "description": "Indulge in this rich and creamy beef stroganoff. Tender strips of beef in a savory mushroom sauce, served over a bed of egg noodles. It's the ultimate comfort food for chilly evenings.", + "author": "Emma Watson", + "date": "2023-05-10", + "category": "Main Course", + "tags": [ + "beef", + "pasta", + "comfort food" + ], + "rating": 4.7 + }, + { + "index": { + "_id": "4" + } + }, + { + "title": "Vegan Chocolate Avocado Mousse", + "description": "Discover the magic of avocado in this rich, vegan chocolate mousse. Creamy, indulgent, and secretly healthy, it's the perfect guilt-free dessert for chocolate lovers.", + "author": "Alex Green", + "date": "2023-05-15", + "category": "Dessert", + "tags": [ + "vegan", + "chocolate", + "avocado", + "healthy dessert" + ], + "rating": 4.5 + }, + { + "index": { + "_id": "5" + } + }, + { + "title": "Crispy Oven-Fried Chicken", + "description": "Get that perfect crunch without the deep fryer! This oven-fried chicken recipe delivers crispy, juicy results every time. A healthier take on the classic comfort food.", + "author": "Maria Rodriguez", + "date": "2023-05-20", + "category": "Main Course", + "tags": [ + "chicken", + "oven-fried", + "healthy" + ], + "rating": 4.9 + } + ], +) +print(resp) +---- diff --git a/docs/examples/bc01aee2ab2ce1690986374bd836e1c7.asciidoc b/docs/examples/bc01aee2ab2ce1690986374bd836e1c7.asciidoc new file mode 100644 index 000000000..f1a16aa7d --- /dev/null +++ b/docs/examples/bc01aee2ab2ce1690986374bd836e1c7.asciidoc @@ -0,0 +1,20 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:317 + +[source, python] +---- +resp = client.search( + index="cooking_blog", + query={ + "multi_match": { + "query": "vegetarian curry", + "fields": [ + "title", + "description", + "tags" + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc b/docs/examples/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc index 0c0ab5ce9..7d635906f 100644 --- a/docs/examples/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc +++ b/docs/examples/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// quickstart/getting-started.asciidoc:227 +// quickstart/getting-started.asciidoc:419 [source, python] ---- diff --git a/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc b/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc index 0672fc36d..4b72e7551 100644 --- a/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc +++ b/docs/examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/apis/simulate-ingest.asciidoc:278 +// ingest/apis/simulate-ingest.asciidoc:346 [source, python] ---- diff --git a/docs/examples/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc b/docs/examples/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc index 93a5c32dc..95a630fbe 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:118 +// ilm/error-handling.asciidoc:121 [source, python] ---- diff --git a/docs/examples/bd68666ca2e0be12f7624016317a62bc.asciidoc b/docs/examples/bd68666ca2e0be12f7624016317a62bc.asciidoc index bdab504e3..b9451d30c 100644 --- a/docs/examples/bd68666ca2e0be12f7624016317a62bc.asciidoc +++ b/docs/examples/bd68666ca2e0be12f7624016317a62bc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/nodes-stats.asciidoc:2563 +// cluster/nodes-stats.asciidoc:2567 [source, python] ---- diff --git a/docs/examples/63d1c07d22a3ca3b0ec6d950547c011c.asciidoc b/docs/examples/bdaf00d791706d7fde25fd65d3735b94.asciidoc similarity index 67% rename from docs/examples/63d1c07d22a3ca3b0ec6d950547c011c.asciidoc rename to docs/examples/bdaf00d791706d7fde25fd65d3735b94.asciidoc index cc72b2cce..08227226e 100644 --- a/docs/examples/63d1c07d22a3ca3b0ec6d950547c011c.asciidoc +++ b/docs/examples/bdaf00d791706d7fde25fd65d3735b94.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/keyword.asciidoc:189 +// mapping/types/keyword.asciidoc:184 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "kwd": { "type": "keyword" diff --git a/docs/examples/be5c5a9c25901737585e4fff9195da3c.asciidoc b/docs/examples/be5c5a9c25901737585e4fff9195da3c.asciidoc index 0959081b9..ab6ef34d1 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:406 +// mapping/types/dense-vector.asciidoc:437 [source, python] ---- diff --git a/docs/examples/be9836fe55c5fada404a2adc1663d832.asciidoc b/docs/examples/be9836fe55c5fada404a2adc1663d832.asciidoc index 8a151046b..0e75ab6c5 100644 --- a/docs/examples/be9836fe55c5fada404a2adc1663d832.asciidoc +++ b/docs/examples/be9836fe55c5fada404a2adc1663d832.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1437 +// mapping/runtime.asciidoc:1435 [source, python] ---- diff --git a/docs/examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc b/docs/examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc new file mode 100644 index 000000000..4f5c79684 --- /dev/null +++ b/docs/examples/befa73a8a419fcf3b7798548b54a20bf.asciidoc @@ -0,0 +1,47 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/knn-search.asciidoc:1167 + +[source, python] +---- +resp = client.search( + index="my-index", + size=10, + knn={ + "query_vector": [ + 0.04283529, + 0.85670587, + -0.51402352, + 0 + ], + "field": "my_int4_vector", + "k": 20, + "num_candidates": 50 + }, + rescore={ + "window_size": 20, + "query": { + "rescore_query": { + "script_score": { + "query": { + "match_all": {} + }, + "script": { + "source": "(dotProduct(params.queryVector, 'my_int4_vector') + 1.0)", + "params": { + "queryVector": [ + 0.04283529, + 0.85670587, + -0.51402352, + 0 + ] + } + } + } + }, + "query_weight": 0, + "rescore_query_weight": 1 + } + }, +) +print(resp) +---- diff --git a/docs/examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc b/docs/examples/bf1de9fa1b825fa875d27fa08821a6d1.asciidoc index 767c6efdf..11de217e5 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:114 +// esql/esql-across-clusters.asciidoc:122 [source, python] ---- diff --git a/docs/examples/c00c9412609832ebceb9e786dd9542df.asciidoc b/docs/examples/c00c9412609832ebceb9e786dd9542df.asciidoc index ea55b13c7..b6b337eac 100644 --- a/docs/examples/c00c9412609832ebceb9e786dd9542df.asciidoc +++ b/docs/examples/c00c9412609832ebceb9e786dd9542df.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-name-description-api.asciidoc:79 +// connector/apis/update-connector-name-description-api.asciidoc:80 [source, python] ---- diff --git a/docs/examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc b/docs/examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc index bf854843c..d50b44d64 100644 --- a/docs/examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc +++ b/docs/examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/retrievers-reranking/semantic-reranking.asciidoc:109 +// reranking/semantic-reranking.asciidoc:105 [source, python] ---- diff --git a/docs/examples/c067182d385f59ce5952fb9a716fbf05.asciidoc b/docs/examples/c067182d385f59ce5952fb9a716fbf05.asciidoc index 4a33d82c0..317a4d06d 100644 --- a/docs/examples/c067182d385f59ce5952fb9a716fbf05.asciidoc +++ b/docs/examples/c067182d385f59ce5952fb9a716fbf05.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ml/anomaly-detection/apis/post-calendar-event.asciidoc:63 +// ml/anomaly-detection/apis/post-calendar-event.asciidoc:79 [source, python] ---- diff --git a/docs/examples/c0ddfb2e6315f5bcf0d3ef414b5bbed3.asciidoc b/docs/examples/c0ddfb2e6315f5bcf0d3ef414b5bbed3.asciidoc index d005a58f0..e41d19d84 100644 --- a/docs/examples/c0ddfb2e6315f5bcf0d3ef414b5bbed3.asciidoc +++ b/docs/examples/c0ddfb2e6315f5bcf0d3ef414b5bbed3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-configuration-api.asciidoc:335 +// connector/apis/update-connector-configuration-api.asciidoc:336 [source, python] ---- diff --git a/docs/examples/c12d6e962f083c728f9397932f05202e.asciidoc b/docs/examples/c12d6e962f083c728f9397932f05202e.asciidoc index b3e1432ec..89fab2035 100644 --- a/docs/examples/c12d6e962f083c728f9397932f05202e.asciidoc +++ b/docs/examples/c12d6e962f083c728f9397932f05202e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/list-connector-sync-jobs-api.asciidoc:71 +// connector/apis/list-connector-sync-jobs-api.asciidoc:72 [source, python] ---- diff --git a/docs/examples/c18100d62ed31bc9e05f62900156e6a8.asciidoc b/docs/examples/c18100d62ed31bc9e05f62900156e6a8.asciidoc index 0be644e92..0011dff0f 100644 --- a/docs/examples/c18100d62ed31bc9e05f62900156e6a8.asciidoc +++ b/docs/examples/c18100d62ed31bc9e05f62900156e6a8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/list-connectors-api.asciidoc:92 +// connector/apis/list-connectors-api.asciidoc:93 [source, python] ---- diff --git a/docs/examples/c186ecf6f799ddff7add1abdecea5821.asciidoc b/docs/examples/c186ecf6f799ddff7add1abdecea5821.asciidoc index 6a9a3035a..9a2e3a3b4 100644 --- a/docs/examples/c186ecf6f799ddff7add1abdecea5821.asciidoc +++ b/docs/examples/c186ecf6f799ddff7add1abdecea5821.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// scripting/fields.asciidoc:214 +// scripting/fields.asciidoc:287 [source, python] ---- diff --git a/docs/examples/c21eb4bc30087188241cbba6b6b89999.asciidoc b/docs/examples/c21eb4bc30087188241cbba6b6b89999.asciidoc index f2ad14f33..8f36dbfdd 100644 --- a/docs/examples/c21eb4bc30087188241cbba6b6b89999.asciidoc +++ b/docs/examples/c21eb4bc30087188241cbba6b6b89999.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-service-type-api.asciidoc:77 +// connector/apis/update-connector-service-type-api.asciidoc:78 [source, python] ---- diff --git a/docs/examples/8575c966b004fb124c7afd6bb5827b50.asciidoc b/docs/examples/c26b185952ddf9842e18493aca2de147.asciidoc similarity index 86% rename from docs/examples/8575c966b004fb124c7afd6bb5827b50.asciidoc rename to docs/examples/c26b185952ddf9842e18493aca2de147.asciidoc index 3b64158d3..9b4b57ad4 100644 --- a/docs/examples/8575c966b004fb124c7afd6bb5827b50.asciidoc +++ b/docs/examples/c26b185952ddf9842e18493aca2de147.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// quickstart/getting-started.asciidoc:64 +// quickstart/getting-started.asciidoc:102 [source, python] ---- diff --git a/docs/examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc b/docs/examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc index 9e77a3417..3bec7673e 100644 --- a/docs/examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc +++ b/docs/examples/c4607ca79b2bcde39305d6f4f21cad37.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/esql-rest.asciidoc:223 +// esql/esql-rest.asciidoc:225 [source, python] ---- diff --git a/docs/examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc b/docs/examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc index 50b57646c..a25ac7386 100644 --- a/docs/examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc +++ b/docs/examples/c6339d09f85000a6432304b0ec63b8f6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-component-template.asciidoc:226 +// indices/put-component-template.asciidoc:229 [source, python] ---- diff --git a/docs/examples/e566e898902e432bc7ea0568400f0c50.asciidoc b/docs/examples/c793efe7280e9b6e09981c4d4f832348.asciidoc similarity index 71% rename from docs/examples/e566e898902e432bc7ea0568400f0c50.asciidoc rename to docs/examples/c793efe7280e9b6e09981c4d4f832348.asciidoc index 1d39f8a28..dcdc437f8 100644 --- a/docs/examples/e566e898902e432bc7ea0568400f0c50.asciidoc +++ b/docs/examples/c793efe7280e9b6e09981c4d4f832348.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/ip.asciidoc:170 +// mapping/types/ip.asciidoc:166 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "ip": { "type": "ip" diff --git a/docs/examples/c8aa8e8c0ac160b8c4efd1ac3b9f48f3.asciidoc b/docs/examples/c8aa8e8c0ac160b8c4efd1ac3b9f48f3.asciidoc new file mode 100644 index 000000000..93dba34c8 --- /dev/null +++ b/docs/examples/c8aa8e8c0ac160b8c4efd1ac3b9f48f3.asciidoc @@ -0,0 +1,23 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/ingest-vectors.asciidoc:35 + +[source, python] +---- +resp = client.indices.create( + index="amazon-reviews", + mappings={ + "properties": { + "review_vector": { + "type": "dense_vector", + "dims": 8, + "index": True, + "similarity": "cosine" + }, + "review_text": { + "type": "text" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/c8fa8d7e029792d539464fede18ce258.asciidoc b/docs/examples/c8fa8d7e029792d539464fede18ce258.asciidoc new file mode 100644 index 000000000..e75f79036 --- /dev/null +++ b/docs/examples/c8fa8d7e029792d539464fede18ce258.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/semantic-search-semantic-text.asciidoc:72 + +[source, python] +---- +resp = client.indices.create( + index="semantic-embeddings", + mappings={ + "properties": { + "content": { + "type": "semantic_text", + "inference_id": "my-elser-endpoint" + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc b/docs/examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc index d9b7e66b8..c403a96b0 100644 --- a/docs/examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc +++ b/docs/examples/cc5eefcc2102aae7e87b0c87b4af10b8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:50 +// esql/multivalued-fields.asciidoc:53 [source, python] ---- diff --git a/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc b/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc new file mode 100644 index 000000000..f42b8b06d --- /dev/null +++ b/docs/examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc @@ -0,0 +1,77 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/apis/simulate-ingest.asciidoc:56 + +[source, python] +---- +resp = client.simulate.ingest( + body={ + "docs": [ + { + "_index": "my-index", + "_id": "id", + "_source": { + "foo": "bar" + } + }, + { + "_index": "my-index", + "_id": "id", + "_source": { + "foo": "rab" + } + } + ], + "pipeline_substitutions": { + "my-pipeline": { + "processors": [ + { + "set": { + "field": "field3", + "value": "value3" + } + } + ] + } + }, + "component_template_substitutions": { + "my-component-template": { + "template": { + "mappings": { + "dynamic": "true", + "properties": { + "field3": { + "type": "keyword" + } + } + }, + "settings": { + "index": { + "default_pipeline": "my-pipeline" + } + } + } + } + }, + "index_template_substitutions": { + "my-index-template": { + "index_patterns": [ + "my-index-*" + ], + "composed_of": [ + "component_template_1", + "component_template_2" + ] + } + }, + "mapping_addition": { + "dynamic": "strict", + "properties": { + "foo": { + "type": "keyword" + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/cd38c601ab293a6ec0e2df71d0c96b58.asciidoc b/docs/examples/cd38c601ab293a6ec0e2df71d0c96b58.asciidoc index 4f4c3fcf1..e743b527a 100644 --- a/docs/examples/cd38c601ab293a6ec0e2df71d0c96b58.asciidoc +++ b/docs/examples/cd38c601ab293a6ec0e2df71d0c96b58.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/put-index-template.asciidoc:344 +// indices/put-index-template.asciidoc:347 [source, python] ---- diff --git a/docs/examples/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc b/docs/examples/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc index 710a66fea..e6a36d4c5 100644 --- a/docs/examples/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc +++ b/docs/examples/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/list-connector-sync-jobs-api.asciidoc:49 +// connector/apis/list-connector-sync-jobs-api.asciidoc:50 [source, python] ---- diff --git a/docs/examples/cde4104a29dfe942d55863cdd8718627.asciidoc b/docs/examples/cde4104a29dfe942d55863cdd8718627.asciidoc index 839bb42dd..0dc636282 100644 --- a/docs/examples/cde4104a29dfe942d55863cdd8718627.asciidoc +++ b/docs/examples/cde4104a29dfe942d55863cdd8718627.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// slm/apis/slm-get-status.asciidoc:42 +// tab-widgets/troubleshooting/data/start-slm.asciidoc:76 [source, python] ---- diff --git a/docs/examples/ce2c2e8f5a2e4daf051b6e10122e5aae.asciidoc b/docs/examples/ce2c2e8f5a2e4daf051b6e10122e5aae.asciidoc index aeeb761ae..e6cd4cf1e 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:490 +// mapping/types/dense-vector.asciidoc:521 [source, python] ---- diff --git a/docs/examples/cedb56a71cc743d80263ce352bb21720.asciidoc b/docs/examples/cedb56a71cc743d80263ce352bb21720.asciidoc index 9f552c719..c101699af 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:91 +// inference/service-elser.asciidoc:113 [source, python] ---- diff --git a/docs/examples/cee491dd0a8d10ed0cb11a2faa0c99f0.asciidoc b/docs/examples/cee491dd0a8d10ed0cb11a2faa0c99f0.asciidoc index c500aef2f..3dfe110b6 100644 --- a/docs/examples/cee491dd0a8d10ed0cb11a2faa0c99f0.asciidoc +++ b/docs/examples/cee491dd0a8d10ed0cb11a2faa0c99f0.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ml/trained-models/apis/infer-trained-model.asciidoc:1078 +// ml/trained-models/apis/infer-trained-model.asciidoc:1179 [source, python] ---- diff --git a/docs/examples/cf23f18761df33f08bc6f6d1875496fd.asciidoc b/docs/examples/cf23f18761df33f08bc6f6d1875496fd.asciidoc index 79ac096c2..b4b4bdf4e 100644 --- a/docs/examples/cf23f18761df33f08bc6f6d1875496fd.asciidoc +++ b/docs/examples/cf23f18761df33f08bc6f6d1875496fd.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:398 +// how-to/size-your-shards.asciidoc:399 [source, python] ---- diff --git a/docs/examples/d003f9110e5a474230abe11f36da9297.asciidoc b/docs/examples/d003f9110e5a474230abe11f36da9297.asciidoc index dc2540244..6c38ffc2b 100644 --- a/docs/examples/d003f9110e5a474230abe11f36da9297.asciidoc +++ b/docs/examples/d003f9110e5a474230abe11f36da9297.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/redact.asciidoc:49 +// ingest/processors/redact.asciidoc:50 [source, python] ---- diff --git a/docs/examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc b/docs/examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc index 2aa1436ea..a696e0d6d 100644 --- a/docs/examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc +++ b/docs/examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// migration/transient-settings-migration-guide.asciidoc:38 +// migration/migrate_9_0/transient-settings-migration-guide.asciidoc:38 [source, python] ---- diff --git a/docs/examples/d03139a851888db53f8b7affd85eb495.asciidoc b/docs/examples/d03139a851888db53f8b7affd85eb495.asciidoc index 15826f686..fb06927ed 100644 --- a/docs/examples/d03139a851888db53f8b7affd85eb495.asciidoc +++ b/docs/examples/d03139a851888db53f8b7affd85eb495.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/check-in-connector-api.asciidoc:68 +// connector/apis/check-in-connector-api.asciidoc:69 [source, python] ---- diff --git a/docs/examples/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc b/docs/examples/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc index 442757e57..94cd61b48 100644 --- a/docs/examples/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc +++ b/docs/examples/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// quickstart/getting-started.asciidoc:103 +// quickstart/getting-started.asciidoc:155 [source, python] ---- diff --git a/docs/examples/d1ea13e1e8372cbf1480a414723ff55a.asciidoc b/docs/examples/d1ea13e1e8372cbf1480a414723ff55a.asciidoc new file mode 100644 index 000000000..3fd7d3beb --- /dev/null +++ b/docs/examples/d1ea13e1e8372cbf1480a414723ff55a.asciidoc @@ -0,0 +1,31 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-zoom.asciidoc:247 + +[source, python] +---- +resp = client.security.create_api_key( + name="connector_name-connector-api-key", + role_descriptors={ + "connector_name-connector-role": { + "cluster": [ + "monitor", + "manage_connector" + ], + "indices": [ + { + "names": [ + "index_name", + ".search-acl-filter-index_name", + ".elastic-connectors*" + ], + "privileges": [ + "all" + ], + "allow_restricted_indices": False + } + ] + } + }, +) +print(resp) +---- diff --git a/docs/examples/d260225cf97e068ead2a8a6bb5aefd90.asciidoc b/docs/examples/d260225cf97e068ead2a8a6bb5aefd90.asciidoc index 7aaf95c43..691f89eb5 100644 --- a/docs/examples/d260225cf97e068ead2a8a6bb5aefd90.asciidoc +++ b/docs/examples/d260225cf97e068ead2a8a6bb5aefd90.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/analyzers/lang-analyzer.asciidoc:1550 +// analysis/analyzers/lang-analyzer.asciidoc:1551 [source, python] ---- diff --git a/docs/examples/443f0e8fbba83777b2df624879d188d5.asciidoc b/docs/examples/d3440ec81dde5f1a01c0206cb35e539c.asciidoc similarity index 85% rename from docs/examples/443f0e8fbba83777b2df624879d188d5.asciidoc rename to docs/examples/d3440ec81dde5f1a01c0206cb35e539c.asciidoc index 19b41f3a9..63436572c 100644 --- a/docs/examples/443f0e8fbba83777b2df624879d188d5.asciidoc +++ b/docs/examples/d3440ec81dde5f1a01c0206cb35e539c.asciidoc @@ -11,7 +11,7 @@ resp = client.reindex( }, dest={ "index": "azure-openai-embeddings", - "pipeline": "azure_openai_embeddings" + "pipeline": "azure_openai_embeddings_pipeline" }, ) print(resp) diff --git a/docs/examples/d3a5b70d493e0bd77b3f2b586341c83c.asciidoc b/docs/examples/d3a5b70d493e0bd77b3f2b586341c83c.asciidoc index 4129b9464..8fbb8c4fe 100644 --- a/docs/examples/d3a5b70d493e0bd77b3f2b586341c83c.asciidoc +++ b/docs/examples/d3a5b70d493e0bd77b3f2b586341c83c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1637 +// mapping/runtime.asciidoc:1635 [source, python] ---- diff --git a/docs/examples/d3e5edac5b461020017fd9d8ec7a91fa.asciidoc b/docs/examples/d3e5edac5b461020017fd9d8ec7a91fa.asciidoc index f1500d9b5..38d2830d9 100644 --- a/docs/examples/d3e5edac5b461020017fd9d8ec7a91fa.asciidoc +++ b/docs/examples/d3e5edac5b461020017fd9d8ec7a91fa.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// security/authorization/managing-roles.asciidoc:264 +// security/authorization/managing-roles.asciidoc:262 [source, python] ---- diff --git a/docs/examples/d603e76ab70131f7ec6b08758f95a0e3.asciidoc b/docs/examples/d603e76ab70131f7ec6b08758f95a0e3.asciidoc index b7e295f92..2d05e9e67 100644 --- a/docs/examples/d603e76ab70131f7ec6b08758f95a0e3.asciidoc +++ b/docs/examples/d603e76ab70131f7ec6b08758f95a0e3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cat/recovery.asciidoc:143 +// cat/recovery.asciidoc:142 [source, python] ---- diff --git a/docs/examples/d69bd36335774c8ae1286cee21310241.asciidoc b/docs/examples/d69bd36335774c8ae1286cee21310241.asciidoc index 846c0f023..686b8d63b 100644 --- a/docs/examples/d69bd36335774c8ae1286cee21310241.asciidoc +++ b/docs/examples/d69bd36335774c8ae1286cee21310241.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// security/authentication/remote-clusters-privileges-api-key.asciidoc:71 +// security/authentication/remote-clusters-privileges-api-key.asciidoc:72 [source, python] ---- diff --git a/docs/examples/d6a21afa4a94b9baa734eac430940bcf.asciidoc b/docs/examples/d6a21afa4a94b9baa734eac430940bcf.asciidoc index c7fca7b67..7857d03d4 100644 --- a/docs/examples/d6a21afa4a94b9baa734eac430940bcf.asciidoc +++ b/docs/examples/d6a21afa4a94b9baa734eac430940bcf.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/list-connectors-api.asciidoc:85 +// connector/apis/list-connectors-api.asciidoc:86 [source, python] ---- diff --git a/docs/examples/d7919fb6f4d02dde1390775eb8365b79.asciidoc b/docs/examples/d7919fb6f4d02dde1390775eb8365b79.asciidoc index 8a23680f6..3103cc120 100644 --- a/docs/examples/d7919fb6f4d02dde1390775eb8365b79.asciidoc +++ b/docs/examples/d7919fb6f4d02dde1390775eb8365b79.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/text.asciidoc:323 +// mapping/types/text.asciidoc:335 [source, python] ---- diff --git a/docs/examples/d98fb2ff2cdd154dff4a576430755d98.asciidoc b/docs/examples/d98fb2ff2cdd154dff4a576430755d98.asciidoc index a76e0c4c3..469ffe6ca 100644 --- a/docs/examples/d98fb2ff2cdd154dff4a576430755d98.asciidoc +++ b/docs/examples/d98fb2ff2cdd154dff4a576430755d98.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1124 +// mapping/runtime.asciidoc:1122 [source, python] ---- diff --git a/docs/examples/dcee24dba43050e4b01b6e3a3211ce09.asciidoc b/docs/examples/dcee24dba43050e4b01b6e3a3211ce09.asciidoc index 21686169d..af347fdfc 100644 --- a/docs/examples/dcee24dba43050e4b01b6e3a3211ce09.asciidoc +++ b/docs/examples/dcee24dba43050e4b01b6e3a3211ce09.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1283 +// mapping/runtime.asciidoc:1281 [source, python] ---- diff --git a/docs/examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc b/docs/examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc new file mode 100644 index 000000000..b26cee2dc --- /dev/null +++ b/docs/examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc @@ -0,0 +1,38 @@ +// This file is autogenerated, DO NOT EDIT +// search/search-your-data/knn-search.asciidoc:1215 + +[source, python] +---- +resp = client.search( + index="my-index", + size=10, + query={ + "script_score": { + "query": { + "knn": { + "query_vector": [ + 0.04283529, + 0.85670587, + -0.51402352, + 0 + ], + "field": "my_int4_vector", + "num_candidates": 20 + } + }, + "script": { + "source": "(dotProduct(params.queryVector, 'my_int4_vector') + 1.0)", + "params": { + "queryVector": [ + 0.04283529, + 0.85670587, + -0.51402352, + 0 + ] + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/dcfa7f479a33f459a2d222a92e651451.asciidoc b/docs/examples/dcfa7f479a33f459a2d222a92e651451.asciidoc index a52fb6c46..031b39953 100644 --- a/docs/examples/dcfa7f479a33f459a2d222a92e651451.asciidoc +++ b/docs/examples/dcfa7f479a33f459a2d222a92e651451.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/security/create-roles.asciidoc:107 +// rest-api/security/create-roles.asciidoc:120 [source, python] ---- diff --git a/docs/examples/3ff634a50e2e4556bad7ea8553576992.asciidoc b/docs/examples/dd3ee00ab2af607b32532180d60a41d4.asciidoc similarity index 85% rename from docs/examples/3ff634a50e2e4556bad7ea8553576992.asciidoc rename to docs/examples/dd3ee00ab2af607b32532180d60a41d4.asciidoc index fd08ed485..11b180706 100644 --- a/docs/examples/3ff634a50e2e4556bad7ea8553576992.asciidoc +++ b/docs/examples/dd3ee00ab2af607b32532180d60a41d4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/tokenfilters/snowball-tokenfilter.asciidoc:17 +// analysis/tokenfilters/snowball-tokenfilter.asciidoc:19 [source, python] ---- @@ -19,7 +19,7 @@ resp = client.indices.create( "filter": { "my_snow": { "type": "snowball", - "language": "Lovins" + "language": "English" } } } diff --git a/docs/examples/0e3abd15dde97a2334621190c4ad4f96.asciidoc b/docs/examples/dd7814258121d3c2e576a7f00469d7e3.asciidoc similarity index 92% rename from docs/examples/0e3abd15dde97a2334621190c4ad4f96.asciidoc rename to docs/examples/dd7814258121d3c2e576a7f00469d7e3.asciidoc index 1067fa1a5..93b2779f4 100644 --- a/docs/examples/0e3abd15dde97a2334621190c4ad4f96.asciidoc +++ b/docs/examples/dd7814258121d3c2e576a7f00469d7e3.asciidoc @@ -4,7 +4,7 @@ [source, python] ---- resp = client.ingest.put_pipeline( - id="mistral_embeddings", + id="mistral_embeddings_pipeline", processors=[ { "inference": { diff --git a/docs/examples/dd792bb53703a57f9207e36d16e26255.asciidoc b/docs/examples/dd792bb53703a57f9207e36d16e26255.asciidoc index a37ac7dc1..9b303bc15 100644 --- a/docs/examples/dd792bb53703a57f9207e36d16e26255.asciidoc +++ b/docs/examples/dd792bb53703a57f9207e36d16e26255.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:1164 +// mapping/runtime.asciidoc:1162 [source, python] ---- diff --git a/docs/examples/ddaadd91b7743a1c7e946ce1b593cd1b.asciidoc b/docs/examples/ddaadd91b7743a1c7e946ce1b593cd1b.asciidoc new file mode 100644 index 000000000..6944bbb1c --- /dev/null +++ b/docs/examples/ddaadd91b7743a1c7e946ce1b593cd1b.asciidoc @@ -0,0 +1,14 @@ +// This file is autogenerated, DO NOT EDIT +// inference/update-inference.asciidoc:77 + +[source, python] +---- +resp = client.inference.inference( + task_type="my-inference-endpoint", + inference_id="_update", + service_settings={ + "api_key": "" + }, +) +print(resp) +---- diff --git a/docs/examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc b/docs/examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc index 534bd51fb..fbbeb3a8f 100644 --- a/docs/examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc +++ b/docs/examples/dddb6a6ebd145f8411c5b4910d332f87.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// esql/multivalued-fields.asciidoc:186 +// esql/multivalued-fields.asciidoc:228 [source, python] ---- diff --git a/docs/examples/df04e2e9af66d5e30b1bfdbd458cab13.asciidoc b/docs/examples/df04e2e9af66d5e30b1bfdbd458cab13.asciidoc index e4d62925c..ce180edf2 100644 --- a/docs/examples/df04e2e9af66d5e30b1bfdbd458cab13.asciidoc +++ b/docs/examples/df04e2e9af66d5e30b1bfdbd458cab13.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:238 +// how-to/size-your-shards.asciidoc:239 [source, python] ---- diff --git a/docs/examples/e017c2de6f93a8dd97f5c6e002dd5c4f.asciidoc b/docs/examples/e017c2de6f93a8dd97f5c6e002dd5c4f.asciidoc new file mode 100644 index 000000000..bdc91a1ff --- /dev/null +++ b/docs/examples/e017c2de6f93a8dd97f5c6e002dd5c4f.asciidoc @@ -0,0 +1,28 @@ +// This file is autogenerated, DO NOT EDIT +// ml/anomaly-detection/apis/post-calendar-event.asciidoc:126 + +[source, python] +---- +resp = client.ml.post_calendar_events( + calendar_id="dst-germany", + events=[ + { + "description": "Fall 2024", + "start_time": 1729994400000, + "end_time": 1730167200000, + "skip_result": False, + "skip_model_update": False, + "force_time_shift": -3600 + }, + { + "description": "Spring 2025", + "start_time": 1743296400000, + "end_time": 1743469200000, + "skip_result": False, + "skip_model_update": False, + "force_time_shift": 3600 + } + ], +) +print(resp) +---- diff --git a/docs/examples/e04267ffc50d916800b919c6cdc9622a.asciidoc b/docs/examples/e04267ffc50d916800b919c6cdc9622a.asciidoc new file mode 100644 index 000000000..58e605469 --- /dev/null +++ b/docs/examples/e04267ffc50d916800b919c6cdc9622a.asciidoc @@ -0,0 +1,13 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/params/ignore-above.asciidoc:74 + +[source, python] +---- +resp = client.indices.create( + index="my-index-000001", + settings={ + "index.mapping.ignore_above": 256 + }, +) +print(resp) +---- diff --git a/docs/examples/e0fcef99656799de6b88117d56f131e2.asciidoc b/docs/examples/e0fcef99656799de6b88117d56f131e2.asciidoc index 2610b22e0..a7851c6c4 100644 --- a/docs/examples/e0fcef99656799de6b88117d56f131e2.asciidoc +++ b/docs/examples/e0fcef99656799de6b88117d56f131e2.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/explain.asciidoc:99 +// troubleshooting/troubleshooting-searches.asciidoc:276 [source, python] ---- diff --git a/docs/examples/e1d6ecab4148b09f4c605474157e7dbd.asciidoc b/docs/examples/e1d6ecab4148b09f4c605474157e7dbd.asciidoc index 75fd178c1..0f1f01902 100644 --- a/docs/examples/e1d6ecab4148b09f4c605474157e7dbd.asciidoc +++ b/docs/examples/e1d6ecab4148b09f4c605474157e7dbd.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/get-settings.asciidoc:11 +// troubleshooting/troubleshooting-searches.asciidoc:305 [source, python] ---- diff --git a/docs/examples/e22a1da3c622611be6855e534c0709ae.asciidoc b/docs/examples/e22a1da3c622611be6855e534c0709ae.asciidoc new file mode 100644 index 000000000..d0c5e0340 --- /dev/null +++ b/docs/examples/e22a1da3c622611be6855e534c0709ae.asciidoc @@ -0,0 +1,13 @@ +// This file is autogenerated, DO NOT EDIT +// query-rules/apis/test-query-ruleset.asciidoc:111 + +[source, python] +---- +resp = client.query_rules.test( + ruleset_id="my-ruleset", + match_criteria={ + "query_string": "puggles" + }, +) +print(resp) +---- diff --git a/docs/examples/e2a22c6fd58cc0becf4c383134a08f8b.asciidoc b/docs/examples/e2a22c6fd58cc0becf4c383134a08f8b.asciidoc index 112f6dd18..26a8a13b2 100644 --- a/docs/examples/e2a22c6fd58cc0becf4c383134a08f8b.asciidoc +++ b/docs/examples/e2a22c6fd58cc0becf4c383134a08f8b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/intervals-query.asciidoc:374 +// query-dsl/intervals-query.asciidoc:445 [source, python] ---- diff --git a/docs/examples/e308899a306e61d1a590868308689955.asciidoc b/docs/examples/e308899a306e61d1a590868308689955.asciidoc new file mode 100644 index 000000000..8773d24c2 --- /dev/null +++ b/docs/examples/e308899a306e61d1a590868308689955.asciidoc @@ -0,0 +1,36 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/processors/ip-location.asciidoc:136 + +[source, python] +---- +resp = client.ingest.put_pipeline( + id="ip_location", + description="Add ip geolocation info", + processors=[ + { + "ip_location": { + "field": "ip", + "target_field": "geo", + "database_file": "GeoLite2-Country.mmdb" + } + } + ], +) +print(resp) + +resp1 = client.index( + index="my-index-000001", + id="my_id", + pipeline="ip_location", + document={ + "ip": "89.160.20.128" + }, +) +print(resp1) + +resp2 = client.get( + index="my-index-000001", + id="my_id", +) +print(resp2) +---- diff --git a/docs/examples/e3fe842951dc873d7d00c8f6a010c53f.asciidoc b/docs/examples/e3fe842951dc873d7d00c8f6a010c53f.asciidoc new file mode 100644 index 000000000..0109eed73 --- /dev/null +++ b/docs/examples/e3fe842951dc873d7d00c8f6a010c53f.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// troubleshooting/common-issues/task-queue-backlog.asciidoc:67 + +[source, python] +---- +resp = client.tasks.list( + human=True, + detailed=True, + actions="indices:data/write/search", +) +print(resp) +---- diff --git a/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc b/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc new file mode 100644 index 000000000..54d3fd679 --- /dev/null +++ b/docs/examples/e4b38973c74037335378d8480f1ce894.asciidoc @@ -0,0 +1,44 @@ +// This file is autogenerated, DO NOT EDIT +// ingest/apis/simulate-ingest.asciidoc:429 + +[source, python] +---- +resp = client.simulate.ingest( + body={ + "docs": [ + { + "_index": "my-index", + "_id": "123", + "_source": { + "foo": "foo" + } + }, + { + "_index": "my-index", + "_id": "456", + "_source": { + "bar": "rab" + } + } + ], + "component_template_substitutions": { + "my-mappings_template": { + "template": { + "mappings": { + "dynamic": "strict", + "properties": { + "foo": { + "type": "keyword" + }, + "bar": { + "type": "keyword" + } + } + } + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/e4b64b8277af259a52c8d3940157b5fa.asciidoc b/docs/examples/e4b64b8277af259a52c8d3940157b5fa.asciidoc index 096deae8c..fda164182 100644 --- a/docs/examples/e4b64b8277af259a52c8d3940157b5fa.asciidoc +++ b/docs/examples/e4b64b8277af259a52c8d3940157b5fa.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// transform/painless-examples.asciidoc:397 +// transform/painless-examples.asciidoc:402 [source, python] ---- diff --git a/docs/examples/e4b6a6a921c97b4c0bbe97bd89f4cf33.asciidoc b/docs/examples/e4b6a6a921c97b4c0bbe97bd89f4cf33.asciidoc index dc93de433..4dfde8e77 100644 --- a/docs/examples/e4b6a6a921c97b4c0bbe97bd89f4cf33.asciidoc +++ b/docs/examples/e4b6a6a921c97b4c0bbe97bd89f4cf33.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// data-streams/promote-data-stream-api.asciidoc:22 +// data-streams/promote-data-stream-api.asciidoc:26 [source, python] ---- diff --git a/docs/examples/e4d1f01c025fb797a1d87f372760eabf.asciidoc b/docs/examples/e4d1f01c025fb797a1d87f372760eabf.asciidoc index 106dc3a6c..754f5c188 100644 --- a/docs/examples/e4d1f01c025fb797a1d87f372760eabf.asciidoc +++ b/docs/examples/e4d1f01c025fb797a1d87f372760eabf.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// troubleshooting/common-issues/hotspotting.asciidoc:265 +// troubleshooting/common-issues/hotspotting.asciidoc:267 [source, python] ---- diff --git a/docs/examples/e551ea38a2d8f8deac110b33304200cc.asciidoc b/docs/examples/e551ea38a2d8f8deac110b33304200cc.asciidoc index a69bf2834..3d6783dc1 100644 --- a/docs/examples/e551ea38a2d8f8deac110b33304200cc.asciidoc +++ b/docs/examples/e551ea38a2d8f8deac110b33304200cc.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/learning-to-rank-search-usage.asciidoc:17 +// reranking/learning-to-rank-search-usage.asciidoc:17 [source, python] ---- diff --git a/docs/examples/4655c3dea0c61935b7ecf1e57441df66.asciidoc b/docs/examples/e9625da419bff6470ffd9927c59ca159.asciidoc similarity index 79% rename from docs/examples/4655c3dea0c61935b7ecf1e57441df66.asciidoc rename to docs/examples/e9625da419bff6470ffd9927c59ca159.asciidoc index 98b608366..d23a92313 100644 --- a/docs/examples/4655c3dea0c61935b7ecf1e57441df66.asciidoc +++ b/docs/examples/e9625da419bff6470ffd9927c59ca159.asciidoc @@ -5,7 +5,7 @@ ---- resp = client.cat.thread_pool( v=True, - h="id,name,active,rejected,completed", + h="id,name,queue,active,rejected,completed", ) print(resp) ---- diff --git a/docs/examples/e9a0b450af6219772631703d602c7092.asciidoc b/docs/examples/e9a0b450af6219772631703d602c7092.asciidoc index 9c1d7c061..27cbd28d2 100644 --- a/docs/examples/e9a0b450af6219772631703d602c7092.asciidoc +++ b/docs/examples/e9a0b450af6219772631703d602c7092.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/text-expansion-query.asciidoc:222 +// query-dsl/text-expansion-query.asciidoc:229 [source, python] ---- diff --git a/docs/examples/e9fc47015922d51c2b05e502ce9c622e.asciidoc b/docs/examples/e9fc47015922d51c2b05e502ce9c622e.asciidoc index 1e857e8bf..0e8ed80cd 100644 --- a/docs/examples/e9fc47015922d51c2b05e502ce9c622e.asciidoc +++ b/docs/examples/e9fc47015922d51c2b05e502ce9c622e.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-google-ai-studio.asciidoc:77 +// inference/service-google-ai-studio.asciidoc:97 [source, python] ---- diff --git a/docs/examples/eb54506fbc71a7d250e86b22d0600114.asciidoc b/docs/examples/eb54506fbc71a7d250e86b22d0600114.asciidoc index e4e933248..89c81acd0 100644 --- a/docs/examples/eb54506fbc71a7d250e86b22d0600114.asciidoc +++ b/docs/examples/eb54506fbc71a7d250e86b22d0600114.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/list-connectors-api.asciidoc:107 +// connector/apis/list-connectors-api.asciidoc:108 [source, python] ---- diff --git a/docs/examples/eb96d7dd5f3116a50f7a86b729f1a934.asciidoc b/docs/examples/eb96d7dd5f3116a50f7a86b729f1a934.asciidoc index 8f52a9370..fcb571114 100644 --- a/docs/examples/eb96d7dd5f3116a50f7a86b729f1a934.asciidoc +++ b/docs/examples/eb96d7dd5f3116a50f7a86b729f1a934.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-scheduling-api.asciidoc:119 +// connector/apis/update-connector-scheduling-api.asciidoc:120 [source, python] ---- diff --git a/docs/examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc b/docs/examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc index 62fa7fdbc..182d9c5ff 100644 --- a/docs/examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc +++ b/docs/examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// rest-api/security/bulk-create-roles.asciidoc:217 +// rest-api/security/bulk-create-roles.asciidoc:230 [source, python] ---- diff --git a/docs/examples/ecfd0d94dd14ef05dfa861f22544b388.asciidoc b/docs/examples/ecfd0d94dd14ef05dfa861f22544b388.asciidoc index 39218d68e..051f91b70 100644 --- a/docs/examples/ecfd0d94dd14ef05dfa861f22544b388.asciidoc +++ b/docs/examples/ecfd0d94dd14ef05dfa861f22544b388.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-error-api.asciidoc:80 +// connector/apis/update-connector-error-api.asciidoc:81 [source, python] ---- diff --git a/docs/examples/ee223e604bb695cad2517d28ae63ac34.asciidoc b/docs/examples/ee223e604bb695cad2517d28ae63ac34.asciidoc index 5604e2e2c..cb15a14c3 100644 --- a/docs/examples/ee223e604bb695cad2517d28ae63ac34.asciidoc +++ b/docs/examples/ee223e604bb695cad2517d28ae63ac34.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/rrf.asciidoc:49 +// search/rrf.asciidoc:47 [source, python] ---- diff --git a/docs/examples/eee6110831c08b9c1b3f56b24656e95b.asciidoc b/docs/examples/eee6110831c08b9c1b3f56b24656e95b.asciidoc index a342f7ada..515c4e510 100644 --- a/docs/examples/eee6110831c08b9c1b3f56b24656e95b.asciidoc +++ b/docs/examples/eee6110831c08b9c1b3f56b24656e95b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-hugging-face.asciidoc:81 +// inference/service-hugging-face.asciidoc:101 [source, python] ---- diff --git a/docs/examples/ef643bab44e7de6ddddde23a2eece5c7.asciidoc b/docs/examples/ef643bab44e7de6ddddde23a2eece5c7.asciidoc new file mode 100644 index 000000000..64764eb76 --- /dev/null +++ b/docs/examples/ef643bab44e7de6ddddde23a2eece5c7.asciidoc @@ -0,0 +1,17 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/getting-started.asciidoc:283 + +[source, python] +---- +resp = client.index( + index="books", + document={ + "name": "The Great Gatsby", + "author": "F. Scott Fitzgerald", + "release_date": "1925-04-10", + "page_count": 180, + "language": "EN" + }, +) +print(resp) +---- diff --git a/docs/examples/ef9c29759459904fef162acd223462c4.asciidoc b/docs/examples/ef9c29759459904fef162acd223462c4.asciidoc index 920357cbd..7d7cd3d0c 100644 --- a/docs/examples/ef9c29759459904fef162acd223462c4.asciidoc +++ b/docs/examples/ef9c29759459904fef162acd223462c4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/nodes-stats.asciidoc:2585 +// cluster/nodes-stats.asciidoc:2589 [source, python] ---- diff --git a/docs/examples/349823d86980d40ac45248c19a59e339.asciidoc b/docs/examples/f03352bb1129938a89f97e4b650038dd.asciidoc similarity index 91% rename from docs/examples/349823d86980d40ac45248c19a59e339.asciidoc rename to docs/examples/f03352bb1129938a89f97e4b650038dd.asciidoc index d770f3f54..ef19c0301 100644 --- a/docs/examples/349823d86980d40ac45248c19a59e339.asciidoc +++ b/docs/examples/f03352bb1129938a89f97e4b650038dd.asciidoc @@ -4,7 +4,7 @@ [source, python] ---- resp = client.ingest.put_pipeline( - id="amazon_bedrock_embeddings", + id="amazon_bedrock_embeddings_pipeline", processors=[ { "inference": { diff --git a/docs/examples/f097c02541056f3c0fc855e7bbeef8a8.asciidoc b/docs/examples/f097c02541056f3c0fc855e7bbeef8a8.asciidoc index 373fbf824..dedc1caaa 100644 --- a/docs/examples/f097c02541056f3c0fc855e7bbeef8a8.asciidoc +++ b/docs/examples/f097c02541056f3c0fc855e7bbeef8a8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// analysis/analyzers/lang-analyzer.asciidoc:1745 +// analysis/analyzers/lang-analyzer.asciidoc:1746 [source, python] ---- diff --git a/docs/examples/f160561efab38e40c2feebf5a2542ab5.asciidoc b/docs/examples/f160561efab38e40c2feebf5a2542ab5.asciidoc index e119375b9..b60a3d3af 100644 --- a/docs/examples/f160561efab38e40c2feebf5a2542ab5.asciidoc +++ b/docs/examples/f160561efab38e40c2feebf5a2542ab5.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/nodes-stats.asciidoc:2593 +// cluster/nodes-stats.asciidoc:2597 [source, python] ---- diff --git a/docs/examples/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc b/docs/examples/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc index 2464c2786..bde573a84 100644 --- a/docs/examples/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc +++ b/docs/examples/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/post-inference.asciidoc:137 +// inference/post-inference.asciidoc:132 [source, python] ---- diff --git a/docs/examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc b/docs/examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc new file mode 100644 index 000000000..2b937027b --- /dev/null +++ b/docs/examples/f1bf0c03581b79c3324cfa3246a60e4d.asciidoc @@ -0,0 +1,22 @@ +// This file is autogenerated, DO NOT EDIT +// mapping/types/dense-vector.asciidoc:184 + +[source, python] +---- +resp = client.indices.create( + index="my-byte-quantized-index", + mappings={ + "properties": { + "my_vector": { + "type": "dense_vector", + "dims": 64, + "index": True, + "index_options": { + "type": "bbq_hnsw" + } + } + } + }, +) +print(resp) +---- diff --git a/docs/examples/f298c4eb50ea97b34c57f8756eb350d3.asciidoc b/docs/examples/f298c4eb50ea97b34c57f8756eb350d3.asciidoc index 1fbfb3e2a..b62249d4e 100644 --- a/docs/examples/f298c4eb50ea97b34c57f8756eb350d3.asciidoc +++ b/docs/examples/f298c4eb50ea97b34c57f8756eb350d3.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cat/pending_tasks.asciidoc:52 +// cat/pending_tasks.asciidoc:51 [source, python] ---- diff --git a/docs/examples/f29a28fffa7ec604a33a838f48f7ea79.asciidoc b/docs/examples/f29a28fffa7ec604a33a838f48f7ea79.asciidoc index db0efa4a5..4399e8556 100644 --- a/docs/examples/f29a28fffa7ec604a33a838f48f7ea79.asciidoc +++ b/docs/examples/f29a28fffa7ec604a33a838f48f7ea79.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// query-dsl/query_filter_context.asciidoc:62 +// query-dsl/query_filter_context.asciidoc:81 [source, python] ---- diff --git a/docs/examples/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc b/docs/examples/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc index 5f93f7a79..61c8fc4f7 100644 --- a/docs/examples/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc +++ b/docs/examples/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/get-connector-api.asciidoc:64 +// connector/apis/get-connector-api.asciidoc:65 [source, python] ---- diff --git a/docs/examples/f321d4e92aa83d573ecf52bf56b0b774.asciidoc b/docs/examples/f321d4e92aa83d573ecf52bf56b0b774.asciidoc new file mode 100644 index 000000000..aa1c9cb27 --- /dev/null +++ b/docs/examples/f321d4e92aa83d573ecf52bf56b0b774.asciidoc @@ -0,0 +1,16 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-API-tutorial.asciidoc:377 + +[source, python] +---- +resp = client.perform_request( + "POST", + "/_connector/_sync_job", + headers={"Content-Type": "application/json"}, + body={ + "id": "my-connector-id", + "job_type": "full" + }, +) +print(resp) +---- diff --git a/docs/examples/f3fb52680482925c202c2e2f8af6f044.asciidoc b/docs/examples/f3fb52680482925c202c2e2f8af6f044.asciidoc index 260106272..bd1263028 100644 --- a/docs/examples/f3fb52680482925c202c2e2f8af6f044.asciidoc +++ b/docs/examples/f3fb52680482925c202c2e2f8af6f044.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:458 +// how-to/size-your-shards.asciidoc:459 [source, python] ---- diff --git a/docs/examples/f45990264f8755b96b11c69c12c90ff4.asciidoc b/docs/examples/f45990264f8755b96b11c69c12c90ff4.asciidoc index df8d497cf..8050dc60c 100644 --- a/docs/examples/f45990264f8755b96b11c69c12c90ff4.asciidoc +++ b/docs/examples/f45990264f8755b96b11c69c12c90ff4.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// indices/indices-exists.asciidoc:10 +// troubleshooting/troubleshooting-searches.asciidoc:21 [source, python] ---- diff --git a/docs/examples/f57ce7de0946e9416ddb9150e95f4b74.asciidoc b/docs/examples/f57ce7de0946e9416ddb9150e95f4b74.asciidoc index 47691a06e..d2d437022 100644 --- a/docs/examples/f57ce7de0946e9416ddb9150e95f4b74.asciidoc +++ b/docs/examples/f57ce7de0946e9416ddb9150e95f4b74.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// inference/service-azure-openai.asciidoc:139 +// inference/service-azure-openai.asciidoc:159 [source, python] ---- diff --git a/docs/examples/f625fdbbe78c4198d9e40b35f3f008b3.asciidoc b/docs/examples/f625fdbbe78c4198d9e40b35f3f008b3.asciidoc new file mode 100644 index 000000000..5e65d8231 --- /dev/null +++ b/docs/examples/f625fdbbe78c4198d9e40b35f3f008b3.asciidoc @@ -0,0 +1,14 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-known-issues.asciidoc:99 + +[source, python] +---- +resp = client.update( + index=".elastic-connectors", + id="connector-id", + doc={ + "custom_scheduling": {} + }, +) +print(resp) +---- diff --git a/docs/examples/f6566395f85d3afe917228643d7318d6.asciidoc b/docs/examples/f6566395f85d3afe917228643d7318d6.asciidoc index 1a38176a3..c5bc986e9 100644 --- a/docs/examples/f6566395f85d3afe917228643d7318d6.asciidoc +++ b/docs/examples/f6566395f85d3afe917228643d7318d6.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// how-to/size-your-shards.asciidoc:468 +// how-to/size-your-shards.asciidoc:469 [source, python] ---- diff --git a/docs/examples/f679e414de48b8fe25e458844be05618.asciidoc b/docs/examples/f679e414de48b8fe25e458844be05618.asciidoc new file mode 100644 index 000000000..4a98eeb2d --- /dev/null +++ b/docs/examples/f679e414de48b8fe25e458844be05618.asciidoc @@ -0,0 +1,13 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/connectors-API-tutorial.asciidoc:179 + +[source, python] +---- +resp = client.connector.put( + connector_id="my-connector-id", + name="Music catalog", + index_name="music", + service_type="postgresql", +) +print(resp) +---- diff --git a/docs/examples/f6ead39c5505045543b9225deca7367d.asciidoc b/docs/examples/f6ead39c5505045543b9225deca7367d.asciidoc index e133cf10f..85a72c5e4 100644 --- a/docs/examples/f6ead39c5505045543b9225deca7367d.asciidoc +++ b/docs/examples/f6ead39c5505045543b9225deca7367d.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// cluster/voting-exclusions.asciidoc:105 +// cluster/voting-exclusions.asciidoc:109 [source, python] ---- diff --git a/docs/examples/f6f647eb644a2d236637ff05f833cb73.asciidoc b/docs/examples/f6f647eb644a2d236637ff05f833cb73.asciidoc new file mode 100644 index 000000000..3301985ae --- /dev/null +++ b/docs/examples/f6f647eb644a2d236637ff05f833cb73.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/_connectors-create-native-api-key.asciidoc:43 + +[source, python] +---- +resp = client.connector.secret_post( + body={ + "value": "encoded_api_key" + }, +) +print(resp) +---- diff --git a/docs/examples/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc b/docs/examples/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc index 47d3faaab..d93907c92 100644 --- a/docs/examples/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc +++ b/docs/examples/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/get-connector-sync-job-api.asciidoc:44 +// connector/apis/get-connector-sync-job-api.asciidoc:45 [source, python] ---- diff --git a/docs/examples/f8525c2460a577edfef156c13f55b8a7.asciidoc b/docs/examples/f7b20e4bb8366f6d2e4486f3bf4211bc.asciidoc similarity index 94% rename from docs/examples/f8525c2460a577edfef156c13f55b8a7.asciidoc rename to docs/examples/f7b20e4bb8366f6d2e4486f3bf4211bc.asciidoc index af1900d64..dc5b9522d 100644 --- a/docs/examples/f8525c2460a577edfef156c13f55b8a7.asciidoc +++ b/docs/examples/f7b20e4bb8366f6d2e4486f3bf4211bc.asciidoc @@ -11,7 +11,7 @@ resp = client.search( "filter": { "range": { "price": { - "to": "500" + "lte": "500" } } } diff --git a/docs/examples/517d291044c3e4448b8804322616ab4a.asciidoc b/docs/examples/f86337e13526c968848cfe29a52d658f.asciidoc similarity index 92% rename from docs/examples/517d291044c3e4448b8804322616ab4a.asciidoc rename to docs/examples/f86337e13526c968848cfe29a52d658f.asciidoc index 4fc02a67c..613de0527 100644 --- a/docs/examples/517d291044c3e4448b8804322616ab4a.asciidoc +++ b/docs/examples/f86337e13526c968848cfe29a52d658f.asciidoc @@ -4,7 +4,7 @@ [source, python] ---- resp = client.ingest.put_pipeline( - id="elser_embeddings", + id="elser_embeddings_pipeline", processors=[ { "inference": { diff --git a/docs/examples/f8f960550104c33e00dc78bc8723ccef.asciidoc b/docs/examples/f8f960550104c33e00dc78bc8723ccef.asciidoc new file mode 100644 index 000000000..9b0699474 --- /dev/null +++ b/docs/examples/f8f960550104c33e00dc78bc8723ccef.asciidoc @@ -0,0 +1,10 @@ +// This file is autogenerated, DO NOT EDIT +// quickstart/full-text-filtering-tutorial.asciidoc:42 + +[source, python] +---- +resp = client.indices.create( + index="cooking_blog", +) +print(resp) +---- diff --git a/docs/examples/1af9742c71ce0587cd49a73ec7fc1f6c.asciidoc b/docs/examples/f95a4d7ab02bf400246c8822f0245f02.asciidoc similarity index 92% rename from docs/examples/1af9742c71ce0587cd49a73ec7fc1f6c.asciidoc rename to docs/examples/f95a4d7ab02bf400246c8822f0245f02.asciidoc index 669023540..9e2f8d55f 100644 --- a/docs/examples/1af9742c71ce0587cd49a73ec7fc1f6c.asciidoc +++ b/docs/examples/f95a4d7ab02bf400246c8822f0245f02.asciidoc @@ -5,7 +5,7 @@ ---- resp = client.cat.ml_trained_models( h="c,o,l,ct,v", - v="ture", + v=True, ) print(resp) ---- diff --git a/docs/examples/1e0f203aced9344382081ab095c44dde.asciidoc b/docs/examples/f9bad6fd369764185e1cb09b89ee39cc.asciidoc similarity index 70% rename from docs/examples/1e0f203aced9344382081ab095c44dde.asciidoc rename to docs/examples/f9bad6fd369764185e1cb09b89ee39cc.asciidoc index 9c3bb543d..64d5b6209 100644 --- a/docs/examples/1e0f203aced9344382081ab095c44dde.asciidoc +++ b/docs/examples/f9bad6fd369764185e1cb09b89ee39cc.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/text.asciidoc:233 +// mapping/types/text.asciidoc:237 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "text": { "type": "text", diff --git a/docs/examples/633c8a9fc57268979d8735c557705809.asciidoc b/docs/examples/fb0152f6c70f647a8b6709969113486d.asciidoc similarity index 69% rename from docs/examples/633c8a9fc57268979d8735c557705809.asciidoc rename to docs/examples/fb0152f6c70f647a8b6709969113486d.asciidoc index d9a6eaf22..1548e7f1b 100644 --- a/docs/examples/633c8a9fc57268979d8735c557705809.asciidoc +++ b/docs/examples/fb0152f6c70f647a8b6709969113486d.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/keyword.asciidoc:219 +// mapping/types/keyword.asciidoc:222 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "kwd": { "type": "keyword", diff --git a/docs/examples/fb56c2ac77d4c308d7702b6b33698382.asciidoc b/docs/examples/fb56c2ac77d4c308d7702b6b33698382.asciidoc new file mode 100644 index 000000000..2d56c218f --- /dev/null +++ b/docs/examples/fb56c2ac77d4c308d7702b6b33698382.asciidoc @@ -0,0 +1,12 @@ +// This file is autogenerated, DO NOT EDIT +// connector/docs/_connectors-create-native-api-key.asciidoc:54 + +[source, python] +---- +resp = client.connector.update_api_key_id( + connector_id="my_connector_id>", + api_key_id="API key_id", + api_key_secret_id="secret_id", +) +print(resp) +---- diff --git a/docs/examples/fc1907515f6a913884a9f86451e90ee8.asciidoc b/docs/examples/fc1907515f6a913884a9f86451e90ee8.asciidoc index 543709c8c..8c60861bf 100644 --- a/docs/examples/fc1907515f6a913884a9f86451e90ee8.asciidoc +++ b/docs/examples/fc1907515f6a913884a9f86451e90ee8.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// search/search-your-data/semantic-search-elser.asciidoc:304 +// search/search-your-data/semantic-search-elser.asciidoc:316 [source, python] ---- diff --git a/docs/examples/fd620f09dbce62c6f0f603a366623607.asciidoc b/docs/examples/fd620f09dbce62c6f0f603a366623607.asciidoc index c8d98272a..dcebe10f0 100644 --- a/docs/examples/fd620f09dbce62c6f0f603a366623607.asciidoc +++ b/docs/examples/fd620f09dbce62c6f0f603a366623607.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// connector/apis/update-connector-filtering-api.asciidoc:149 +// connector/apis/update-connector-filtering-api.asciidoc:150 [source, python] ---- diff --git a/docs/examples/fd7eeadab6251d9113c4380a7fbe2572.asciidoc b/docs/examples/fd7eeadab6251d9113c4380a7fbe2572.asciidoc index e7756bd54..d2ed6b932 100644 --- a/docs/examples/fd7eeadab6251d9113c4380a7fbe2572.asciidoc +++ b/docs/examples/fd7eeadab6251d9113c4380a7fbe2572.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// security/authentication/remote-clusters-privileges-api-key.asciidoc:26 +// security/authentication/remote-clusters-privileges-api-key.asciidoc:27 [source, python] ---- diff --git a/docs/examples/1fcc4a3280be399753dcfd5c489ff682.asciidoc b/docs/examples/fe6429d0d82174aa5acf95e96e237380.asciidoc similarity index 70% rename from docs/examples/1fcc4a3280be399753dcfd5c489ff682.asciidoc rename to docs/examples/fe6429d0d82174aa5acf95e96e237380.asciidoc index 2dac63638..efcf594b4 100644 --- a/docs/examples/1fcc4a3280be399753dcfd5c489ff682.asciidoc +++ b/docs/examples/fe6429d0d82174aa5acf95e96e237380.asciidoc @@ -1,14 +1,20 @@ // This file is autogenerated, DO NOT EDIT -// mapping/types/range.asciidoc:316 +// mapping/types/range.asciidoc:324 [source, python] ---- resp = client.indices.create( index="idx", + settings={ + "index": { + "mapping": { + "source": { + "mode": "synthetic" + } + } + } + }, mappings={ - "_source": { - "mode": "synthetic" - }, "properties": { "my_range": { "type": "ip_range" diff --git a/docs/examples/ff1b96d2fdcf628bd938bff9e939943c.asciidoc b/docs/examples/ff1b96d2fdcf628bd938bff9e939943c.asciidoc index 8bab9f402..6894641fb 100644 --- a/docs/examples/ff1b96d2fdcf628bd938bff9e939943c.asciidoc +++ b/docs/examples/ff1b96d2fdcf628bd938bff9e939943c.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// mapping/runtime.asciidoc:967 +// mapping/runtime.asciidoc:965 [source, python] ---- diff --git a/docs/examples/ff27e5cddd1f58d8a8f84f807fd27eec.asciidoc b/docs/examples/ff27e5cddd1f58d8a8f84f807fd27eec.asciidoc index 9ce7f1ce8..4f9e86fb4 100644 --- a/docs/examples/ff27e5cddd1f58d8a8f84f807fd27eec.asciidoc +++ b/docs/examples/ff27e5cddd1f58d8a8f84f807fd27eec.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ingest/processors/redact.asciidoc:178 +// ingest/processors/redact.asciidoc:179 [source, python] ---- diff --git a/docs/examples/ff776c0fccf93e1c7050f7cb7efbae0b.asciidoc b/docs/examples/ff776c0fccf93e1c7050f7cb7efbae0b.asciidoc index 5effa743d..be4d854b0 100644 --- a/docs/examples/ff776c0fccf93e1c7050f7cb7efbae0b.asciidoc +++ b/docs/examples/ff776c0fccf93e1c7050f7cb7efbae0b.asciidoc @@ -1,5 +1,5 @@ // This file is autogenerated, DO NOT EDIT -// ml/trained-models/apis/infer-trained-model.asciidoc:905 +// ml/trained-models/apis/infer-trained-model.asciidoc:1006 [source, python] ---- diff --git a/docs/guide/release-notes.asciidoc b/docs/guide/release-notes.asciidoc index 674346865..b09fd4569 100644 --- a/docs/guide/release-notes.asciidoc +++ b/docs/guide/release-notes.asciidoc @@ -1,6 +1,7 @@ [[release-notes]] == Release notes +* <> * <> * <> * <> @@ -41,6 +42,37 @@ * <> * <> +[discrete] +[[rn-8-16-0]] +=== 8.16.0 (2024-11-12) + +- Support Python 3.13 (https://github.com/elastic/elasticsearch-py/pull/2689[#2689]) +- Emit Python warnings for beta and tech preview APIs (https://github.com/elastic/elasticsearch-py/pull/2685[#2685]) +- Vectorstore: use a retriever query for hybrid search (https://github.com/elastic/elasticsearch-py/pull/2682[#2682]) +- Allow retries for statuses other than 429 in streaming bulk (https://github.com/elastic/elasticsearch-py/pull/2702[#2702]) +- Make `BulkIndexError` and `ScanError` serializable (https://github.com/elastic/elasticsearch-py/pull/2700[#2700]) +- Fix import when `trace` is missing from `opentelemetry` package (https://github.com/elastic/elasticsearch-py/pull/2705[#2705]) +- Update APIs: + * Fix `nodes` parameter in Task management API + * Add Test query rule API + * Add Create Cross-Cluster API key and Update Cross-Cluster API key APIs + * Add Verify snapshot repository API + * Add `data_stream_name` and `settings` to Delete auto-follow pattern API + * Add `max_samples_per_key` to Get async EQL status API + * Add `lifecycle` and remove unused `data_retention` and `downsampling parameters` from Put data stream lifecycle API + * Add `include_remotes` and remove `flat_settings` from Cluster stats API + * Add `remote_indices` to Create or update application privileges and Create or update roles APIs + +Note that the new Python warnings can be disabled as follows: + +[source,python] +---- +import warnings +from elasticsearch.exceptions import GeneralAvailabilityWarning + +warnings.filterwarnings("ignore", category=GeneralAvailabilityWarning) +---- + [discrete] [[rn-8-15-1]] === 8.15.1 (2024-09-08) @@ -51,8 +83,6 @@ - Add `q` parameter to Update by Query API - Add `allow_no_indices` and `ignore_unavailable` parameters to Resolve index API - - [discrete] [[rn-8-15-0]] === 8.15.0 (2024-08-09) diff --git a/elasticsearch/_version.py b/elasticsearch/_version.py index cf59dc4a8..f1a7a85f5 100644 --- a/elasticsearch/_version.py +++ b/elasticsearch/_version.py @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -__versionstr__ = "8.15.1" +__versionstr__ = "8.16.0" diff --git a/pyproject.toml b/pyproject.toml index 8640b40fa..8a55e0b67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ keywords = [ ] dynamic = ["version"] dependencies = [ - "elastic-transport>=8.13,<9", + "elastic-transport>=8.15.1,<9", ] [project.optional-dependencies] diff --git a/utils/generate-docs-examples/package-lock.json b/utils/generate-docs-examples/package-lock.json index 3148aba96..6c4f1bc41 100644 --- a/utils/generate-docs-examples/package-lock.json +++ b/utils/generate-docs-examples/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@elastic/request-converter": "~8.15.2", + "@elastic/request-converter": "^8.15.2", "minimist": "^1.2.6", "node-fetch": "^2.6.7", "ora": "^5.4.1", @@ -17,9 +17,9 @@ } }, "node_modules/@elastic/request-converter": { - "version": "8.15.4", - "resolved": "https://registry.npmjs.org/@elastic/request-converter/-/request-converter-8.15.4.tgz", - "integrity": "sha512-iZDQpZpygV+AVOweaDzTsMJBfa2hwwduPXNNzk/yTXgC9qtjmns/AjehtLStKXs274+u3fg+BFxVt6NcMwUAAg==", + "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==", "license": "Apache-2.0", "dependencies": { "child-process-promise": "^2.2.1",