diff --git a/docs/doc_examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc b/docs/doc_examples/0393ca5a2942e1f00ed87546d0d50732.asciidoc similarity index 92% rename from docs/doc_examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc rename to docs/doc_examples/0393ca5a2942e1f00ed87546d0d50732.asciidoc index 84fdefbae..4709c48bb 100644 --- a/docs/doc_examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc +++ b/docs/doc_examples/0393ca5a2942e1f00ed87546d0d50732.asciidoc @@ -4,7 +4,7 @@ [source, js] ---- const response = await client.indices.create({ - index: "my-index-000002", + index: "my-index-000003", mappings: { properties: { metrics: { @@ -29,7 +29,7 @@ const response = await client.indices.create({ console.log(response); const response1 = await client.indices.getMapping({ - index: "my-index-000002", + index: "my-index-000003", }); console.log(response1); ---- diff --git a/docs/doc_examples/840f8c863c30b04abcf2dd66b846f157.asciidoc b/docs/doc_examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc similarity index 96% rename from docs/doc_examples/840f8c863c30b04abcf2dd66b846f157.asciidoc rename to docs/doc_examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc index e16ea6560..16eda0fcc 100644 --- a/docs/doc_examples/840f8c863c30b04abcf2dd66b846f157.asciidoc +++ b/docs/doc_examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc @@ -14,6 +14,7 @@ const response = await 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/doc_examples/43d9e314431336a6f084cea76dfd6489.asciidoc b/docs/doc_examples/43d9e314431336a6f084cea76dfd6489.asciidoc new file mode 100644 index 000000000..bccc8d81f --- /dev/null +++ b/docs/doc_examples/43d9e314431336a6f084cea76dfd6489.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.search({ + index: "restaurants", + retriever: { + knn: { + field: "vector", + query_vector: [10, 22, 77], + k: 10, + num_candidates: 10, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc b/docs/doc_examples/565386eee0951865a684e41fab53b40c.asciidoc similarity index 95% rename from docs/doc_examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc rename to docs/doc_examples/565386eee0951865a684e41fab53b40c.asciidoc index 160884d3b..149cff486 100644 --- a/docs/doc_examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc +++ b/docs/doc_examples/565386eee0951865a684e41fab53b40c.asciidoc @@ -14,6 +14,7 @@ const response = await client.inference.put({ min_number_of_allocations: 3, max_number_of_allocations: 10, }, + num_threads: 1, }, }, }); diff --git a/docs/doc_examples/58f6b72009512851843c7b7a20e9504a.asciidoc b/docs/doc_examples/58f6b72009512851843c7b7a20e9504a.asciidoc new file mode 100644 index 000000000..ab21c2d80 --- /dev/null +++ b/docs/doc_examples/58f6b72009512851843c7b7a20e9504a.asciidoc @@ -0,0 +1,19 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await 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", + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/69541f0bb81ab3797926bb2a00607cda.asciidoc b/docs/doc_examples/69541f0bb81ab3797926bb2a00607cda.asciidoc new file mode 100644 index 000000000..bf62637fc --- /dev/null +++ b/docs/doc_examples/69541f0bb81ab3797926bb2a00607cda.asciidoc @@ -0,0 +1,19 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await 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", + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc b/docs/doc_examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc new file mode 100644 index 000000000..a541500cb --- /dev/null +++ b/docs/doc_examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc @@ -0,0 +1,45 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await 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, + }, + }, + ], + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/a4ec42130f3c75fc9d1d5f7cb6222cd5.asciidoc b/docs/doc_examples/745864ef2427188241a4702b94ea57be.asciidoc similarity index 95% rename from docs/doc_examples/a4ec42130f3c75fc9d1d5f7cb6222cd5.asciidoc rename to docs/doc_examples/745864ef2427188241a4702b94ea57be.asciidoc index 2f5f16ec0..a33976eea 100644 --- a/docs/doc_examples/a4ec42130f3c75fc9d1d5f7cb6222cd5.asciidoc +++ b/docs/doc_examples/745864ef2427188241a4702b94ea57be.asciidoc @@ -11,7 +11,7 @@ const response = await client.search({ filter: { range: { price: { - to: "500", + lte: "500", }, }, }, diff --git a/docs/doc_examples/7b1b947bddd7e78f77da265f7e645a61.asciidoc b/docs/doc_examples/7b1b947bddd7e78f77da265f7e645a61.asciidoc new file mode 100644 index 000000000..56a48d68d --- /dev/null +++ b/docs/doc_examples/7b1b947bddd7e78f77da265f7e645a61.asciidoc @@ -0,0 +1,51 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.indices.create({ + index: "my-index-000004", + mappings: { + properties: { + metrics: { + subobjects: "auto", + properties: { + time: { + type: "object", + properties: { + min: { + type: "long", + }, + }, + }, + to: { + type: "object", + properties: { + inner_metrics: { + type: "object", + subobjects: "auto", + properties: { + time: { + type: "object", + properties: { + max: { + type: "long", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, +}); +console.log(response); + +const response1 = await client.indices.getMapping({ + index: "my-index-000004", +}); +console.log(response1); +---- diff --git a/docs/doc_examples/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc b/docs/doc_examples/8417d8d35ec5fc5665dfb2f95d6d1101.asciidoc similarity index 94% rename from docs/doc_examples/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc rename to docs/doc_examples/8417d8d35ec5fc5665dfb2f95d6d1101.asciidoc index b6c3a9585..12610d1a5 100644 --- a/docs/doc_examples/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc +++ b/docs/doc_examples/8417d8d35ec5fc5665dfb2f95d6d1101.asciidoc @@ -17,7 +17,7 @@ const response = await client.search({ { range: { "result.execution_time": { - from: "now-10s", + gte: "now-10s", }, }, }, diff --git a/docs/doc_examples/8477e77e4fad19af66f03f81b8f2592b.asciidoc b/docs/doc_examples/8477e77e4fad19af66f03f81b8f2592b.asciidoc new file mode 100644 index 000000000..246988f49 --- /dev/null +++ b/docs/doc_examples/8477e77e4fad19af66f03f81b8f2592b.asciidoc @@ -0,0 +1,20 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.search({ + index: "my-index", + query: { + semantic: { + field: "inference_field", + query: "mountain lake", + inner_hits: { + from: 1, + size: 1, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/bdb671866e2f0195f8dfbdb7f20bf591.asciidoc b/docs/doc_examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc similarity index 73% rename from docs/doc_examples/bdb671866e2f0195f8dfbdb7f20bf591.asciidoc rename to docs/doc_examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc index f758ada37..b5190e9a8 100644 --- a/docs/doc_examples/bdb671866e2f0195f8dfbdb7f20bf591.asciidoc +++ b/docs/doc_examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc @@ -9,7 +9,11 @@ const response = await 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/doc_examples/8d750dfc067b1184c32a2423c60e4d06.asciidoc b/docs/doc_examples/8d750dfc067b1184c32a2423c60e4d06.asciidoc new file mode 100644 index 000000000..1e0682cbf --- /dev/null +++ b/docs/doc_examples/8d750dfc067b1184c32a2423c60e4d06.asciidoc @@ -0,0 +1,17 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.search({ + index: "my-index", + query: { + semantic: { + field: "inference_field", + query: "mountain lake", + inner_hits: {}, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc b/docs/doc_examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc new file mode 100644 index 000000000..39f61a37a --- /dev/null +++ b/docs/doc_examples/9169d19a80175ec94f80865d0f9bef4c.asciidoc @@ -0,0 +1,36 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await 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, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/971fd23adb81bb5842c7750e0379336a.asciidoc b/docs/doc_examples/971fd23adb81bb5842c7750e0379336a.asciidoc new file mode 100644 index 000000000..e1b27bc79 --- /dev/null +++ b/docs/doc_examples/971fd23adb81bb5842c7750e0379336a.asciidoc @@ -0,0 +1,26 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await 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", + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/9dfe3b02bd15409b4b8b36e9756e8f94.asciidoc b/docs/doc_examples/9dfe3b02bd15409b4b8b36e9756e8f94.asciidoc new file mode 100644 index 000000000..c55dc60ae --- /dev/null +++ b/docs/doc_examples/9dfe3b02bd15409b4b8b36e9756e8f94.asciidoc @@ -0,0 +1,17 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.index({ + index: "my-index", + id: "lake_tahoe", + document: { + inference_field: [ + "Lake Tahoe is the largest alpine lake in North America", + "When hiking in the area, please be on alert for bears", + ], + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc b/docs/doc_examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc new file mode 100644 index 000000000..fffbd6549 --- /dev/null +++ b/docs/doc_examples/a1dda7e7c01be96a4acf7b725d70385f.asciidoc @@ -0,0 +1,28 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await 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, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc b/docs/doc_examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc new file mode 100644 index 000000000..abe4e885c --- /dev/null +++ b/docs/doc_examples/a3646b59da66b9ab68bdbc8dc2e6a9be.asciidoc @@ -0,0 +1,32 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.search({ + index: "restaurants", + retriever: { + standard: { + query: { + bool: { + should: [ + { + match: { + region: "Austria", + }, + }, + ], + filter: [ + { + term: { + year: "2019", + }, + }, + ], + }, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/dbb8fa2b8af6db66cf75ca4b83c0fb21.asciidoc b/docs/doc_examples/dbb8fa2b8af6db66cf75ca4b83c0fb21.asciidoc new file mode 100644 index 000000000..db6a26798 --- /dev/null +++ b/docs/doc_examples/dbb8fa2b8af6db66cf75ca4b83c0fb21.asciidoc @@ -0,0 +1,68 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.indices.create({ + index: "my-index-000002", + mappings: { + properties: { + metrics: { + type: "object", + subobjects: "auto", + properties: { + inner: { + type: "object", + enabled: false, + }, + nested: { + type: "nested", + }, + }, + }, + }, + }, +}); +console.log(response); + +const response1 = await client.index({ + index: "my-index-000002", + id: "metric_1", + document: { + "metrics.time": 100, + "metrics.time.min": 10, + "metrics.time.max": 900, + }, +}); +console.log(response1); + +const response2 = await client.index({ + index: "my-index-000002", + id: "metric_2", + document: { + metrics: { + time: 100, + "time.min": 10, + "time.max": 900, + inner: { + foo: "bar", + "path.to.some.field": "baz", + }, + nested: [ + { + id: 10, + }, + { + id: 1, + }, + ], + }, + }, +}); +console.log(response2); + +const response3 = await client.indices.getMapping({ + index: "my-index-000002", +}); +console.log(response3); +---- diff --git a/docs/doc_examples/7c8f207e43115ea8f20d2298be5aaebc.asciidoc b/docs/doc_examples/dbce6cb1eaf9b2cc36b7f9a13afc63ea.asciidoc similarity index 62% rename from docs/doc_examples/7c8f207e43115ea8f20d2298be5aaebc.asciidoc rename to docs/doc_examples/dbce6cb1eaf9b2cc36b7f9a13afc63ea.asciidoc index eb0ee1488..00f3a3a14 100644 --- a/docs/doc_examples/7c8f207e43115ea8f20d2298be5aaebc.asciidoc +++ b/docs/doc_examples/dbce6cb1eaf9b2cc36b7f9a13afc63ea.asciidoc @@ -33,6 +33,25 @@ const response = await client.simulate.ingest({ ], }, }, + component_template_substitutions: { + "my-component-template": { + template: { + mappings: { + dynamic: "true", + properties: { + field3: { + type: "keyword", + }, + }, + }, + settings: { + index: { + default_pipeline: "my-pipeline", + }, + }, + }, + }, + }, }, }); console.log(response); diff --git a/docs/doc_examples/e017c2de6f93a8dd97f5c6e002dd5c4f.asciidoc b/docs/doc_examples/e017c2de6f93a8dd97f5c6e002dd5c4f.asciidoc new file mode 100644 index 000000000..153d1a4ff --- /dev/null +++ b/docs/doc_examples/e017c2de6f93a8dd97f5c6e002dd5c4f.asciidoc @@ -0,0 +1,28 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.ml.postCalendarEvents({ + 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, + }, + ], +}); +console.log(response); +---- diff --git a/docs/doc_examples/e04267ffc50d916800b919c6cdc9622a.asciidoc b/docs/doc_examples/e04267ffc50d916800b919c6cdc9622a.asciidoc new file mode 100644 index 000000000..5893b52d1 --- /dev/null +++ b/docs/doc_examples/e04267ffc50d916800b919c6cdc9622a.asciidoc @@ -0,0 +1,13 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.indices.create({ + index: "my-index-000001", + settings: { + "index.mapping.ignore_above": 256, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/e4b38973c74037335378d8480f1ce894.asciidoc b/docs/doc_examples/e4b38973c74037335378d8480f1ce894.asciidoc new file mode 100644 index 000000000..92b9b7363 --- /dev/null +++ b/docs/doc_examples/e4b38973c74037335378d8480f1ce894.asciidoc @@ -0,0 +1,44 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await 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", + }, + }, + }, + }, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/f8525c2460a577edfef156c13f55b8a7.asciidoc b/docs/doc_examples/f7b20e4bb8366f6d2e4486f3bf4211bc.asciidoc similarity index 95% rename from docs/doc_examples/f8525c2460a577edfef156c13f55b8a7.asciidoc rename to docs/doc_examples/f7b20e4bb8366f6d2e4486f3bf4211bc.asciidoc index 96afb8772..a673f8da2 100644 --- a/docs/doc_examples/f8525c2460a577edfef156c13f55b8a7.asciidoc +++ b/docs/doc_examples/f7b20e4bb8366f6d2e4486f3bf4211bc.asciidoc @@ -11,7 +11,7 @@ const response = await client.search({ filter: { range: { price: { - to: "500", + lte: "500", }, }, }, diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 01c260ca6..8036726c6 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -5579,6 +5579,8 @@ client.inference.put({ inference_id }) [discrete] ==== delete_geoip_database Deletes a geoip database configuration. + +{ref}/delete-geoip-database-api.html[Endpoint documentation] [source,ts] ---- client.ingest.deleteGeoipDatabase({ id }) @@ -5628,6 +5630,8 @@ client.ingest.geoIpStats() [discrete] ==== get_geoip_database Returns information about one or more geoip database configurations. + +{ref}/get-geoip-database-api.html[Endpoint documentation] [source,ts] ---- client.ingest.getGeoipDatabase({ ... }) @@ -5681,6 +5685,8 @@ client.ingest.processorGrok() [discrete] ==== put_geoip_database Returns information about one or more geoip database configurations. + +{ref}/put-geoip-database-api.html[Endpoint documentation] [source,ts] ---- client.ingest.putGeoipDatabase({ id, name, maxmind }) diff --git a/src/api/api/ingest.ts b/src/api/api/ingest.ts index 733e0ab28..160868706 100644 --- a/src/api/api/ingest.ts +++ b/src/api/api/ingest.ts @@ -46,7 +46,7 @@ export default class Ingest { /** * Deletes a geoip database configuration. - * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html | Elasticsearch API documentation} + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-geoip-database-api.html | Elasticsearch API documentation} */ async deleteGeoipDatabase (this: That, params: T.IngestDeleteGeoipDatabaseRequest | TB.IngestDeleteGeoipDatabaseRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteGeoipDatabase (this: That, params: T.IngestDeleteGeoipDatabaseRequest | TB.IngestDeleteGeoipDatabaseRequest, options?: TransportRequestOptionsWithMeta): Promise> @@ -140,7 +140,7 @@ export default class Ingest { /** * Returns information about one or more geoip database configurations. - * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html | Elasticsearch API documentation} + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/get-geoip-database-api.html | Elasticsearch API documentation} */ async getGeoipDatabase (this: That, params?: T.IngestGetGeoipDatabaseRequest | TB.IngestGetGeoipDatabaseRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getGeoipDatabase (this: That, params?: T.IngestGetGeoipDatabaseRequest | TB.IngestGetGeoipDatabaseRequest, options?: TransportRequestOptionsWithMeta): Promise> @@ -250,7 +250,7 @@ export default class Ingest { /** * Returns information about one or more geoip database configurations. - * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html | Elasticsearch API documentation} + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-geoip-database-api.html | Elasticsearch API documentation} */ async putGeoipDatabase (this: That, params: T.IngestPutGeoipDatabaseRequest | TB.IngestPutGeoipDatabaseRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putGeoipDatabase (this: That, params: T.IngestPutGeoipDatabaseRequest | TB.IngestPutGeoipDatabaseRequest, options?: TransportRequestOptionsWithMeta): Promise> diff --git a/src/api/types.ts b/src/api/types.ts index 4007052a9..7211d8512 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -1263,6 +1263,10 @@ export interface SearchAggregationProfileDebug { segments_counted?: integer segments_collected?: integer map_reducer?: string + brute_force_used?: integer + dynamic_pruning_attempted?: integer + dynamic_pruning_used?: integer + skipped_due_to_no_data?: integer } export interface SearchAggregationProfileDelegateDebugFilter { @@ -1315,6 +1319,39 @@ export interface SearchCompletionSuggester extends SearchSuggesterBase { export type SearchContext = string | GeoLocation +export interface SearchDfsKnnProfile { + vector_operations_count?: long + query: SearchKnnQueryProfileResult[] + rewrite_time: long + collector: SearchKnnCollectorResult[] +} + +export interface SearchDfsProfile { + statistics?: SearchDfsStatisticsProfile + knn?: SearchDfsKnnProfile[] +} + +export interface SearchDfsStatisticsBreakdown { + collection_statistics: long + collection_statistics_count: long + create_weight: long + create_weight_count: long + rewrite: long + rewrite_count: long + term_statistics: long + term_statistics_count: long +} + +export interface SearchDfsStatisticsProfile { + type: string + description: string + time?: Duration + time_in_nanos: DurationValue + breakdown: SearchDfsStatisticsBreakdown + debug?: Record + children?: SearchDfsStatisticsProfile[] +} + export interface SearchDirectGenerator { field: Field max_edits?: integer @@ -1423,10 +1460,10 @@ export interface SearchHit { fields?: Record highlight?: Record inner_hits?: Record - matched_queries?: string[] | Record + matched_queries?: string[] | Record _nested?: SearchNestedIdentity _ignored?: string[] - ignored_field_values?: Record + ignored_field_values?: Record _shard?: string _node?: string _routing?: string @@ -1467,6 +1504,47 @@ export interface SearchInnerHitsResult { hits: SearchHitsMetadata } +export interface SearchKnnCollectorResult { + name: string + reason: string + time?: Duration + time_in_nanos: DurationValue + children?: SearchKnnCollectorResult[] +} + +export interface SearchKnnQueryProfileBreakdown { + advance: long + advance_count: long + build_scorer: long + build_scorer_count: long + compute_max_score: long + compute_max_score_count: long + count_weight: long + count_weight_count: long + create_weight: long + create_weight_count: long + match: long + match_count: long + next_doc: long + next_doc_count: long + score: long + score_count: long + set_min_competitive_score: long + set_min_competitive_score_count: long + shallow_advance: long + shallow_advance_count: long +} + +export interface SearchKnnQueryProfileResult { + type: string + description: string + time?: Duration + time_in_nanos: DurationValue + breakdown: SearchKnnQueryProfileBreakdown + debug?: Record + children?: SearchKnnQueryProfileResult[] +} + export interface SearchLaplaceSmoothingModel { alpha: double } @@ -1557,6 +1635,8 @@ export interface SearchQueryBreakdown { score_count: long compute_max_score: long compute_max_score_count: long + count_weight: long + count_weight_count: long set_min_competitive_score: long set_min_competitive_score_count: long } @@ -1597,9 +1677,14 @@ export interface SearchSearchProfile { export interface SearchShardProfile { aggregations: SearchAggregationProfile[] + cluster: string + dfs?: SearchDfsProfile + fetch?: SearchFetchProfile id: string + index: IndexName + node_id: NodeId searches: SearchSearchProfile[] - fetch?: SearchFetchProfile + shard_id: long } export interface SearchSmoothingModelContainer { @@ -6153,6 +6238,7 @@ export type QueryDslTermsQuery = QueryDslTermsQueryKeys export type QueryDslTermsQueryField = FieldValue[] | QueryDslTermsLookup export interface QueryDslTermsSetQuery extends QueryDslQueryBase { + minimum_should_match?: MinimumShouldMatch minimum_should_match_field?: Field minimum_should_match_script?: Script | string terms: string[] diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts index 0dc180f99..30b7994c2 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -1318,6 +1318,10 @@ export interface SearchAggregationProfileDebug { segments_counted?: integer segments_collected?: integer map_reducer?: string + brute_force_used?: integer + dynamic_pruning_attempted?: integer + dynamic_pruning_used?: integer + skipped_due_to_no_data?: integer } export interface SearchAggregationProfileDelegateDebugFilter { @@ -1370,6 +1374,39 @@ export interface SearchCompletionSuggester extends SearchSuggesterBase { export type SearchContext = string | GeoLocation +export interface SearchDfsKnnProfile { + vector_operations_count?: long + query: SearchKnnQueryProfileResult[] + rewrite_time: long + collector: SearchKnnCollectorResult[] +} + +export interface SearchDfsProfile { + statistics?: SearchDfsStatisticsProfile + knn?: SearchDfsKnnProfile[] +} + +export interface SearchDfsStatisticsBreakdown { + collection_statistics: long + collection_statistics_count: long + create_weight: long + create_weight_count: long + rewrite: long + rewrite_count: long + term_statistics: long + term_statistics_count: long +} + +export interface SearchDfsStatisticsProfile { + type: string + description: string + time?: Duration + time_in_nanos: DurationValue + breakdown: SearchDfsStatisticsBreakdown + debug?: Record + children?: SearchDfsStatisticsProfile[] +} + export interface SearchDirectGenerator { field: Field max_edits?: integer @@ -1478,10 +1515,10 @@ export interface SearchHit { fields?: Record highlight?: Record inner_hits?: Record - matched_queries?: string[] | Record + matched_queries?: string[] | Record _nested?: SearchNestedIdentity _ignored?: string[] - ignored_field_values?: Record + ignored_field_values?: Record _shard?: string _node?: string _routing?: string @@ -1522,6 +1559,47 @@ export interface SearchInnerHitsResult { hits: SearchHitsMetadata } +export interface SearchKnnCollectorResult { + name: string + reason: string + time?: Duration + time_in_nanos: DurationValue + children?: SearchKnnCollectorResult[] +} + +export interface SearchKnnQueryProfileBreakdown { + advance: long + advance_count: long + build_scorer: long + build_scorer_count: long + compute_max_score: long + compute_max_score_count: long + count_weight: long + count_weight_count: long + create_weight: long + create_weight_count: long + match: long + match_count: long + next_doc: long + next_doc_count: long + score: long + score_count: long + set_min_competitive_score: long + set_min_competitive_score_count: long + shallow_advance: long + shallow_advance_count: long +} + +export interface SearchKnnQueryProfileResult { + type: string + description: string + time?: Duration + time_in_nanos: DurationValue + breakdown: SearchKnnQueryProfileBreakdown + debug?: Record + children?: SearchKnnQueryProfileResult[] +} + export interface SearchLaplaceSmoothingModel { alpha: double } @@ -1612,6 +1690,8 @@ export interface SearchQueryBreakdown { score_count: long compute_max_score: long compute_max_score_count: long + count_weight: long + count_weight_count: long set_min_competitive_score: long set_min_competitive_score_count: long } @@ -1652,9 +1732,14 @@ export interface SearchSearchProfile { export interface SearchShardProfile { aggregations: SearchAggregationProfile[] + cluster: string + dfs?: SearchDfsProfile + fetch?: SearchFetchProfile id: string + index: IndexName + node_id: NodeId searches: SearchSearchProfile[] - fetch?: SearchFetchProfile + shard_id: long } export interface SearchSmoothingModelContainer { @@ -6226,6 +6311,7 @@ export type QueryDslTermsQuery = QueryDslTermsQueryKeys export type QueryDslTermsQueryField = FieldValue[] | QueryDslTermsLookup export interface QueryDslTermsSetQuery extends QueryDslQueryBase { + minimum_should_match?: MinimumShouldMatch minimum_should_match_field?: Field minimum_should_match_script?: Script | string terms: string[]