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 ccd0a029c..c9fef6ef1 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -941,7 +941,7 @@ client.search({ ... }) ** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams and indices, omit this parameter or use `*` or `_all`. -** *`aggregations` (Optional, Record)*: Defines the aggregations that are run as part of the search request. +** *`aggregations` (Optional, Record)*: Defines the aggregations that are run as part of the search request. ** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })*: Collapses search results the values of the specified field. ** *`explain` (Optional, boolean)*: If true, returns detailed information about score computation as part of a hit. ** *`ext` (Optional, Record)*: Configuration of search extensions defined by Elasticsearch plugins. @@ -1099,7 +1099,7 @@ client.searchMvt({ index, field, zoom, x, y }) ** *`zoom` (number)*: Zoom level for the vector tile to search ** *`x` (number)*: X coordinate for the vector tile to search ** *`y` (number)*: Y coordinate for the vector tile to search -** *`aggs` (Optional, Record)*: Sub-aggregations for the geotile_grid. +** *`aggs` (Optional, Record)*: Sub-aggregations for the geotile_grid. Supports the following aggregation types: - avg @@ -1478,7 +1478,7 @@ client.asyncSearch.submit({ ... }) * *Request (object):* ** *`index` (Optional, string | string[])*: A list of index names to search; use `_all` or empty string to perform the operation on all indices -** *`aggregations` (Optional, Record)* +** *`aggregations` (Optional, Record)* ** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })* ** *`explain` (Optional, boolean)*: If true, returns detailed information about score computation as part of a hit. ** *`ext` (Optional, Record)*: Configuration of search extensions defined by Elasticsearch plugins. @@ -3669,7 +3669,7 @@ client.fleet.search({ index }) * *Request (object):* ** *`index` (string | string)*: A single target to search. If the target is an index alias, it must resolve to a single index. -** *`aggregations` (Optional, Record)* +** *`aggregations` (Optional, Record)* ** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })* ** *`explain` (Optional, boolean)*: If true, returns detailed information about score computation as part of a hit. ** *`ext` (Optional, Record)*: Configuration of search extensions defined by Elasticsearch plugins. @@ -5056,7 +5056,7 @@ a new date field is added instead of string. not used at all by Elasticsearch, but can be used to store application-specific metadata. ** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields. -** *`properties` (Optional, Record)*: Mapping for a field. For new fields, this mapping can include: +** *`properties` (Optional, Record)*: Mapping for a field. For new fields, this mapping can include: - Field name - Field data type @@ -5674,6 +5674,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 }) @@ -5723,6 +5725,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({ ... }) @@ -5776,6 +5780,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 }) @@ -7154,7 +7160,7 @@ client.ml.postCalendarEvents({ calendar_id, events }) * *Request (object):* ** *`calendar_id` (string)*: A string that uniquely identifies a calendar. -** *`events` ({ calendar_id, event_id, description, end_time, start_time }[])*: A list of one of more scheduled events. The event’s start and end times can be specified as integer milliseconds since the epoch or as a string in ISO 8601 format. +** *`events` ({ calendar_id, event_id, description, end_time, start_time, skip_result, skip_model_update, force_time_shift }[])*: A list of one of more scheduled events. The event’s start and end times can be specified as integer milliseconds since the epoch or as a string in ISO 8601 format. [discrete] ==== post_data @@ -7366,7 +7372,7 @@ client.ml.putDatafeed({ datafeed_id }) ** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. -** *`aggregations` (Optional, Record)*: If set, the datafeed performs aggregation searches. +** *`aggregations` (Optional, Record)*: If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data. ** *`chunking_config` (Optional, { mode, time_span })*: Datafeeds might be required to search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. @@ -7902,7 +7908,7 @@ client.ml.updateDatafeed({ datafeed_id }) ** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. -** *`aggregations` (Optional, Record)*: If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only +** *`aggregations` (Optional, Record)*: If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data. ** *`chunking_config` (Optional, { mode, time_span })*: Datafeeds might search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of @@ -8539,7 +8545,7 @@ client.rollup.rollupSearch({ index }) * *Request (object):* ** *`index` (string | string[])*: Enables searching rolled-up data using the standard Query DSL. -** *`aggregations` (Optional, Record)*: Specifies aggregations. +** *`aggregations` (Optional, Record)*: Specifies aggregations. ** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Specifies a DSL query. ** *`size` (Optional, number)*: Must be zero if set, as rollups work on pre-aggregated data. ** *`rest_total_hits_as_int` (Optional, boolean)*: Indicates whether hits.total should be rendered as an integer or an object in the rest search response @@ -8585,7 +8591,8 @@ If set to `false`, the API returns immediately and the indexer is stopped asynch === search_application [discrete] ==== delete -Deletes a search application. +Delete a search application. +Remove a search application and its associated alias. Indices attached to the search application are not removed. {ref}/delete-search-application.html[Endpoint documentation] [source,ts] @@ -8602,6 +8609,7 @@ client.searchApplication.delete({ name }) [discrete] ==== delete_behavioral_analytics Delete a behavioral analytics collection. +The associated data stream is also deleted. {ref}/delete-analytics-collection.html[Endpoint documentation] [source,ts] @@ -8617,7 +8625,7 @@ client.searchApplication.deleteBehavioralAnalytics({ name }) [discrete] ==== get -Returns the details about a search application +Get search application details. {ref}/get-search-application.html[Endpoint documentation] [source,ts] @@ -8633,7 +8641,7 @@ client.searchApplication.get({ name }) [discrete] ==== get_behavioral_analytics -Returns the existing behavioral analytics collections. +Get behavioral analytics collections. {ref}/list-analytics-collection.html[Endpoint documentation] [source,ts] @@ -8678,7 +8686,7 @@ client.searchApplication.postBehavioralAnalyticsEvent() [discrete] ==== put -Creates or updates a search application. +Create or update a search application. {ref}/put-search-application.html[Endpoint documentation] [source,ts] @@ -8696,7 +8704,7 @@ client.searchApplication.put({ name }) [discrete] ==== put_behavioral_analytics -Creates a behavioral analytics collection. +Create a behavioral analytics collection. {ref}/put-analytics-collection.html[Endpoint documentation] [source,ts] @@ -8723,7 +8731,9 @@ client.searchApplication.renderQuery() [discrete] ==== search -Perform a search against a search application. +Run a search application search. +Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. +Unspecified template parameters are assigned their default values if applicable. {ref}/search-application-search.html[Endpoint documentation] [source,ts] @@ -9662,6 +9672,7 @@ client.security.putRole({ name }) ** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "cross_cluster_replication" | "cross_cluster_search" | "delegate_pki" | "grant_api_key" | "manage" | "manage_api_key" | "manage_autoscaling" | "manage_behavioral_analytics" | "manage_ccr" | "manage_data_frame_transforms" | "manage_data_stream_global_retention" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_inference" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_search_application" | "manage_search_query_rules" | "manage_search_synonyms" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_data_frame_transforms" | "monitor_data_stream_global_retention" | "monitor_enrich" | "monitor_inference" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "none" | "post_behavioral_analytics_event" | "read_ccr" | "read_fleet_secrets" | "read_ilm" | "read_pipeline" | "read_security" | "read_slm" | "transport_client" | "write_connector_secrets" | "write_fleet_secrets")[])*: A list of cluster privileges. These privileges define the cluster-level actions for users with this role. ** *`global` (Optional, Record)*: An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. ** *`indices` (Optional, { field_security, names, privileges, query, allow_restricted_indices }[])*: A list of indices permissions entries. +** *`remote_indices` (Optional, { clusters, field_security, names, privileges, query, allow_restricted_indices }[])*: A list of remote indices permissions entries. ** *`metadata` (Optional, Record)*: Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use. ** *`run_as` (Optional, string[])*: A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected. ** *`description` (Optional, string)*: Optional description of the role descriptor @@ -10603,7 +10614,7 @@ precedence over mapped fields with the same name. ** *`keep_alive` (Optional, string | -1 | 0)*: Retention period for an async or saved synchronous search. ** *`keep_on_completion` (Optional, boolean)*: If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. ** *`index_using_frozen` (Optional, boolean)*: If true, the search can run on frozen indices. Defaults to false. -** *`format` (Optional, string)*: Format for the response. +** *`format` (Optional, Enum("csv" | "json" | "tsv" | "txt" | "yaml" | "cbor" | "smile"))*: Format for the response. [discrete] ==== translate @@ -11500,7 +11511,7 @@ client.xpack.info({ ... }) ==== Arguments * *Request (object):* -** *`categories` (Optional, string[])*: A list of the information categories to include in the response. For example, `build,license,features`. +** *`categories` (Optional, Enum("build" | "features" | "license")[])*: A list of the information categories to include in the response. For example, `build,license,features`. ** *`accept_enterprise` (Optional, boolean)*: If this param is used it must be set to true ** *`human` (Optional, boolean)*: Defines whether additional human-readable information is included in the response. In particular, it adds descriptions and a tag line. diff --git a/src/api/api/ingest.ts b/src/api/api/ingest.ts index 31c3fc3dd..442dcbcfe 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/master/TODO.html | Elasticsearch API documentation} + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/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/master/TODO.html | Elasticsearch API documentation} + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/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/master/TODO.html | Elasticsearch API documentation} + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/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/api/search_application.ts b/src/api/api/search_application.ts index 52c8e9546..cd22d99c8 100644 --- a/src/api/api/search_application.ts +++ b/src/api/api/search_application.ts @@ -45,7 +45,7 @@ export default class SearchApplication { } /** - * Deletes a search application. + * Delete a search application. Remove a search application and its associated alias. Indices attached to the search application are not removed. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html | Elasticsearch API documentation} */ async delete (this: That, params: T.SearchApplicationDeleteRequest | TB.SearchApplicationDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -77,7 +77,7 @@ export default class SearchApplication { } /** - * Delete a behavioral analytics collection. + * Delete a behavioral analytics collection. The associated data stream is also deleted. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html | Elasticsearch API documentation} */ async deleteBehavioralAnalytics (this: That, params: T.SearchApplicationDeleteBehavioralAnalyticsRequest | TB.SearchApplicationDeleteBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -109,7 +109,7 @@ export default class SearchApplication { } /** - * Returns the details about a search application + * Get search application details. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html | Elasticsearch API documentation} */ async get (this: That, params: T.SearchApplicationGetRequest | TB.SearchApplicationGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -141,7 +141,7 @@ export default class SearchApplication { } /** - * Returns the existing behavioral analytics collections. + * Get behavioral analytics collections. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html | Elasticsearch API documentation} */ async getBehavioralAnalytics (this: That, params?: T.SearchApplicationGetBehavioralAnalyticsRequest | TB.SearchApplicationGetBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -244,7 +244,7 @@ export default class SearchApplication { } /** - * Creates or updates a search application. + * Create or update a search application. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html | Elasticsearch API documentation} */ async put (this: That, params: T.SearchApplicationPutRequest | TB.SearchApplicationPutRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -281,7 +281,7 @@ export default class SearchApplication { } /** - * Creates a behavioral analytics collection. + * Create a behavioral analytics collection. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html | Elasticsearch API documentation} */ async putBehavioralAnalytics (this: That, params: T.SearchApplicationPutBehavioralAnalyticsRequest | TB.SearchApplicationPutBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -345,7 +345,7 @@ export default class SearchApplication { } /** - * Perform a search against a search application. + * Run a search application search. Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. Unspecified template parameters are assigned their default values if applicable. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html | Elasticsearch API documentation} */ async search> (this: That, params: T.SearchApplicationSearchRequest | TB.SearchApplicationSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise> diff --git a/src/api/api/security.ts b/src/api/api/security.ts index b5e25f38a..a3a602545 100644 --- a/src/api/api/security.ts +++ b/src/api/api/security.ts @@ -1685,7 +1685,7 @@ export default class Security { async putRole (this: That, params: T.SecurityPutRoleRequest | TB.SecurityPutRoleRequest, options?: TransportRequestOptions): Promise async putRole (this: That, params: T.SecurityPutRoleRequest | TB.SecurityPutRoleRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['name'] - const acceptedBody: string[] = ['applications', 'cluster', 'global', 'indices', 'metadata', 'run_as', 'description', 'transient_metadata'] + const acceptedBody: string[] = ['applications', 'cluster', 'global', 'indices', 'remote_indices', 'metadata', 'run_as', 'description', 'transient_metadata'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body diff --git a/src/api/api/snapshot.ts b/src/api/api/snapshot.ts index cd0f53dcf..9e8419ebf 100644 --- a/src/api/api/snapshot.ts +++ b/src/api/api/snapshot.ts @@ -374,6 +374,38 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body, meta }, options) } + /** + * Verifies the integrity of the contents of a snapshot repository + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html | Elasticsearch API documentation} + */ + async repositoryVerifyIntegrity (this: That, params: T.SnapshotRepositoryVerifyIntegrityRequest | TB.SnapshotRepositoryVerifyIntegrityRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async repositoryVerifyIntegrity (this: That, params: T.SnapshotRepositoryVerifyIntegrityRequest | TB.SnapshotRepositoryVerifyIntegrityRequest, options?: TransportRequestOptionsWithMeta): Promise> + async repositoryVerifyIntegrity (this: That, params: T.SnapshotRepositoryVerifyIntegrityRequest | TB.SnapshotRepositoryVerifyIntegrityRequest, options?: TransportRequestOptions): Promise + async repositoryVerifyIntegrity (this: That, params: T.SnapshotRepositoryVerifyIntegrityRequest | TB.SnapshotRepositoryVerifyIntegrityRequest, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = ['name'] + const querystring: Record = {} + const body = undefined + + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + // @ts-expect-error + querystring[key] = params[key] + } + } + + const method = 'POST' + const path = `/_snapshot/${encodeURIComponent(params.name.toString())}/_verify_integrity` + const meta: TransportRequestMetadata = { + name: 'snapshot.repository_verify_integrity', + pathParts: { + name: params.name + } + } + return await this.transport.request({ path, method, querystring, body, meta }, options) + } + /** * Restores a snapshot. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html | Elasticsearch API documentation} diff --git a/src/api/types.ts b/src/api/types.ts index b1eb67bd2..3b0eb9061 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -1283,6 +1283,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 { @@ -1335,6 +1339,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 @@ -1442,10 +1479,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 @@ -1486,6 +1523,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 } @@ -1576,6 +1654,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 } @@ -1616,9 +1696,14 @@ export interface SearchSearchProfile { export interface SearchShardProfile { aggregations: SearchAggregationProfile[] - id: string - searches: SearchSearchProfile[] + cluster: string + dfs?: SearchDfsProfile fetch?: SearchFetchProfile + id: string + index: IndexName + node_id: NodeId + searches: SearchSearchProfile[] + shard_id: long } export interface SearchSmoothingModelContainer { @@ -2936,6 +3021,7 @@ export interface AggregationsAggregationContainer { rare_terms?: AggregationsRareTermsAggregation rate?: AggregationsRateAggregation reverse_nested?: AggregationsReverseNestedAggregation + random_sampler?: AggregationsRandomSamplerAggregation sampler?: AggregationsSamplerAggregation scripted_metric?: AggregationsScriptedMetricAggregation serial_diff?: AggregationsSerialDifferencingAggregation @@ -3823,6 +3909,12 @@ export interface AggregationsPipelineAggregationBase extends AggregationsBucketP gap_policy?: AggregationsGapPolicy } +export interface AggregationsRandomSamplerAggregation extends AggregationsBucketAggregationBase { + probability: double + seed?: integer + shard_seed?: integer +} + export interface AggregationsRangeAggregate extends AggregationsMultiBucketAggregateBase { } @@ -4644,14 +4736,14 @@ export interface AnalysisKeywordAnalyzer { export interface AnalysisKeywordMarkerTokenFilter extends AnalysisTokenFilterBase { type: 'keyword_marker' ignore_case?: boolean - keywords?: string[] + keywords?: string | string[] keywords_path?: string keywords_pattern?: string } export interface AnalysisKeywordTokenizer extends AnalysisTokenizerBase { type: 'keyword' - buffer_size: integer + buffer_size?: integer } export interface AnalysisKuromojiAnalyzer { @@ -5210,7 +5302,6 @@ export interface MappingConstantKeywordProperty extends MappingPropertyBase { export interface MappingCorePropertyBase extends MappingPropertyBase { copy_to?: Fields - similarity?: string store?: boolean } @@ -5291,7 +5382,7 @@ export interface MappingDynamicProperty extends MappingDocValuesPropertyBase { index?: boolean index_options?: MappingIndexOptions index_phrases?: boolean - index_prefixes?: MappingTextIndexPrefixes + index_prefixes?: MappingTextIndexPrefixes | null norms?: boolean position_increment_gap?: integer search_analyzer?: string @@ -5451,6 +5542,7 @@ export interface MappingKeywordProperty extends MappingDocValuesPropertyBase { normalizer?: string norms?: boolean null_value?: string + similarity?: string | null split_queries_on_whitespace?: boolean time_series_dimension?: boolean type: 'keyword' @@ -5579,6 +5671,7 @@ export interface MappingSearchAsYouTypeProperty extends MappingCorePropertyBase norms?: boolean search_analyzer?: string search_quote_analyzer?: string + similarity?: string | null term_vector?: MappingTermVectorOption type: 'search_as_you_type' } @@ -5644,11 +5737,12 @@ export interface MappingTextProperty extends MappingCorePropertyBase { index?: boolean index_options?: MappingIndexOptions index_phrases?: boolean - index_prefixes?: MappingTextIndexPrefixes + index_prefixes?: MappingTextIndexPrefixes | null norms?: boolean position_increment_gap?: integer search_analyzer?: string search_quote_analyzer?: string + similarity?: string | null term_vector?: MappingTermVectorOption type: 'text' } @@ -6442,9 +6536,10 @@ 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[] + terms: FieldValue[] } export interface QueryDslTextExpansionQuery extends QueryDslQueryBase { @@ -13343,6 +13438,9 @@ export interface MlCalendarEvent { description: string end_time: DateTime start_time: DateTime + skip_result?: boolean + skip_model_update?: boolean + force_time_shift?: integer } export type MlCategorizationAnalyzer = string | MlCategorizationAnalyzerDefinition @@ -13747,9 +13845,7 @@ export interface MlDelayedDataCheckConfig { export type MlDeploymentAllocationState = 'started' | 'starting' | 'fully_allocated' -export type MlDeploymentAssignmentState = 'starting' | 'started' | 'stopping' | 'failed' - -export type MlDeploymentState = 'started' | 'starting' | 'stopping' +export type MlDeploymentAssignmentState = 'started' | 'starting' | 'stopping' | 'failed' export interface MlDetectionRule { actions?: MlRuleAction[] @@ -14339,7 +14435,7 @@ export interface MlTrainedModelDeploymentStats { rejected_execution_count: integer reason: string start_time: EpochTime - state: MlDeploymentState + state: MlDeploymentAssignmentState threads_per_allocation: integer timeout_count: integer } @@ -17131,6 +17227,15 @@ export interface SecurityRealmInfo { type: string } +export interface SecurityRemoteIndicesPrivileges { + clusters: Names + field_security?: SecurityFieldSecurity + names: Indices + privileges: SecurityIndexPrivilege[] + query?: SecurityIndicesPrivilegesQuery + allow_restricted_indices?: boolean +} + export interface SecurityRoleDescriptor { cluster?: SecurityClusterPrivilege[] indices?: SecurityIndicesPrivileges[] @@ -17783,6 +17888,7 @@ export interface SecurityPutRoleRequest extends RequestBase { cluster?: SecurityClusterPrivilege[] global?: Record indices?: SecurityIndicesPrivileges[] + remote_indices?: SecurityRemoteIndicesPrivileges[] metadata?: Metadata run_as?: string[] description?: string @@ -18408,6 +18514,7 @@ export interface SnapshotSnapshotShardFailure { node_id?: Id reason: string shard_id: Id + index_uuid: Id status: string } @@ -18558,6 +18665,20 @@ export interface SnapshotGetRepositoryRequest extends RequestBase { export type SnapshotGetRepositoryResponse = Record +export interface SnapshotRepositoryVerifyIntegrityRequest extends RequestBase { + name: Names + meta_thread_pool_concurrency?: integer + blob_thread_pool_concurrency?: integer + snapshot_verification_concurrency?: integer + index_verification_concurrency?: integer + index_snapshot_verification_concurrency?: integer + max_failed_shard_snapshots?: integer + verify_blob_contents?: boolean + max_bytes_per_sec?: string +} + +export type SnapshotRepositoryVerifyIntegrityResponse = any + export interface SnapshotRestoreRequest extends RequestBase { repository: Name snapshot: Name @@ -18662,7 +18783,7 @@ export interface SqlGetAsyncStatusResponse { } export interface SqlQueryRequest extends RequestBase { - format?: string + format?: SqlQuerySqlFormat catalog?: string columnar?: boolean cursor?: string @@ -18690,6 +18811,8 @@ export interface SqlQueryResponse { rows: SqlRow[] } +export type SqlQuerySqlFormat = 'csv' | 'json' | 'tsv' | 'txt' | 'yaml' | 'cbor' | 'smile' + export interface SqlTranslateRequest extends RequestBase { fetch_size?: integer filter?: QueryDslQueryContainer @@ -19977,7 +20100,7 @@ export interface XpackInfoNativeCodeInformation { } export interface XpackInfoRequest extends RequestBase { - categories?: string[] + categories?: XpackInfoXPackCategory[] accept_enterprise?: boolean human?: boolean } @@ -19989,6 +20112,8 @@ export interface XpackInfoResponse { tagline: string } +export type XpackInfoXPackCategory = 'build' | 'features' | 'license' + export interface XpackUsageAnalytics extends XpackUsageBase { stats: XpackUsageAnalyticsStatistics } diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts index 3d846a344..32b8d047e 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -1341,6 +1341,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 { @@ -1393,6 +1397,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 @@ -1500,10 +1537,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 @@ -1544,6 +1581,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 } @@ -1634,6 +1712,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 } @@ -1674,9 +1754,14 @@ export interface SearchSearchProfile { export interface SearchShardProfile { aggregations: SearchAggregationProfile[] - id: string - searches: SearchSearchProfile[] + cluster: string + dfs?: SearchDfsProfile fetch?: SearchFetchProfile + id: string + index: IndexName + node_id: NodeId + searches: SearchSearchProfile[] + shard_id: long } export interface SearchSmoothingModelContainer { @@ -3012,6 +3097,7 @@ export interface AggregationsAggregationContainer { rare_terms?: AggregationsRareTermsAggregation rate?: AggregationsRateAggregation reverse_nested?: AggregationsReverseNestedAggregation + random_sampler?: AggregationsRandomSamplerAggregation sampler?: AggregationsSamplerAggregation scripted_metric?: AggregationsScriptedMetricAggregation serial_diff?: AggregationsSerialDifferencingAggregation @@ -3899,6 +3985,12 @@ export interface AggregationsPipelineAggregationBase extends AggregationsBucketP gap_policy?: AggregationsGapPolicy } +export interface AggregationsRandomSamplerAggregation extends AggregationsBucketAggregationBase { + probability: double + seed?: integer + shard_seed?: integer +} + export interface AggregationsRangeAggregate extends AggregationsMultiBucketAggregateBase { } @@ -4720,14 +4812,14 @@ export interface AnalysisKeywordAnalyzer { export interface AnalysisKeywordMarkerTokenFilter extends AnalysisTokenFilterBase { type: 'keyword_marker' ignore_case?: boolean - keywords?: string[] + keywords?: string | string[] keywords_path?: string keywords_pattern?: string } export interface AnalysisKeywordTokenizer extends AnalysisTokenizerBase { type: 'keyword' - buffer_size: integer + buffer_size?: integer } export interface AnalysisKuromojiAnalyzer { @@ -5286,7 +5378,6 @@ export interface MappingConstantKeywordProperty extends MappingPropertyBase { export interface MappingCorePropertyBase extends MappingPropertyBase { copy_to?: Fields - similarity?: string store?: boolean } @@ -5367,7 +5458,7 @@ export interface MappingDynamicProperty extends MappingDocValuesPropertyBase { index?: boolean index_options?: MappingIndexOptions index_phrases?: boolean - index_prefixes?: MappingTextIndexPrefixes + index_prefixes?: MappingTextIndexPrefixes | null norms?: boolean position_increment_gap?: integer search_analyzer?: string @@ -5527,6 +5618,7 @@ export interface MappingKeywordProperty extends MappingDocValuesPropertyBase { normalizer?: string norms?: boolean null_value?: string + similarity?: string | null split_queries_on_whitespace?: boolean time_series_dimension?: boolean type: 'keyword' @@ -5655,6 +5747,7 @@ export interface MappingSearchAsYouTypeProperty extends MappingCorePropertyBase norms?: boolean search_analyzer?: string search_quote_analyzer?: string + similarity?: string | null term_vector?: MappingTermVectorOption type: 'search_as_you_type' } @@ -5720,11 +5813,12 @@ export interface MappingTextProperty extends MappingCorePropertyBase { index?: boolean index_options?: MappingIndexOptions index_phrases?: boolean - index_prefixes?: MappingTextIndexPrefixes + index_prefixes?: MappingTextIndexPrefixes | null norms?: boolean position_increment_gap?: integer search_analyzer?: string search_quote_analyzer?: string + similarity?: string | null term_vector?: MappingTermVectorOption type: 'text' } @@ -6518,9 +6612,10 @@ 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[] + terms: FieldValue[] } export interface QueryDslTextExpansionQuery extends QueryDslQueryBase { @@ -13584,6 +13679,9 @@ export interface MlCalendarEvent { description: string end_time: DateTime start_time: DateTime + skip_result?: boolean + skip_model_update?: boolean + force_time_shift?: integer } export type MlCategorizationAnalyzer = string | MlCategorizationAnalyzerDefinition @@ -13988,9 +14086,7 @@ export interface MlDelayedDataCheckConfig { export type MlDeploymentAllocationState = 'started' | 'starting' | 'fully_allocated' -export type MlDeploymentAssignmentState = 'starting' | 'started' | 'stopping' | 'failed' - -export type MlDeploymentState = 'started' | 'starting' | 'stopping' +export type MlDeploymentAssignmentState = 'started' | 'starting' | 'stopping' | 'failed' export interface MlDetectionRule { actions?: MlRuleAction[] @@ -14580,7 +14676,7 @@ export interface MlTrainedModelDeploymentStats { rejected_execution_count: integer reason: string start_time: EpochTime - state: MlDeploymentState + state: MlDeploymentAssignmentState threads_per_allocation: integer timeout_count: integer } @@ -17508,6 +17604,15 @@ export interface SecurityRealmInfo { type: string } +export interface SecurityRemoteIndicesPrivileges { + clusters: Names + field_security?: SecurityFieldSecurity + names: Indices + privileges: SecurityIndexPrivilege[] + query?: SecurityIndicesPrivilegesQuery + allow_restricted_indices?: boolean +} + export interface SecurityRoleDescriptor { cluster?: SecurityClusterPrivilege[] indices?: SecurityIndicesPrivileges[] @@ -18196,6 +18301,7 @@ export interface SecurityPutRoleRequest extends RequestBase { cluster?: SecurityClusterPrivilege[] global?: Record indices?: SecurityIndicesPrivileges[] + remote_indices?: SecurityRemoteIndicesPrivileges[] metadata?: Metadata run_as?: string[] description?: string @@ -18868,6 +18974,7 @@ export interface SnapshotSnapshotShardFailure { node_id?: Id reason: string shard_id: Id + index_uuid: Id status: string } @@ -19025,6 +19132,20 @@ export interface SnapshotGetRepositoryRequest extends RequestBase { export type SnapshotGetRepositoryResponse = Record +export interface SnapshotRepositoryVerifyIntegrityRequest extends RequestBase { + name: Names + meta_thread_pool_concurrency?: integer + blob_thread_pool_concurrency?: integer + snapshot_verification_concurrency?: integer + index_verification_concurrency?: integer + index_snapshot_verification_concurrency?: integer + max_failed_shard_snapshots?: integer + verify_blob_contents?: boolean + max_bytes_per_sec?: string +} + +export type SnapshotRepositoryVerifyIntegrityResponse = any + export interface SnapshotRestoreRequest extends RequestBase { repository: Name snapshot: Name @@ -19135,7 +19256,7 @@ export interface SqlGetAsyncStatusResponse { } export interface SqlQueryRequest extends RequestBase { - format?: string + format?: SqlQuerySqlFormat /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { catalog?: string @@ -19166,6 +19287,8 @@ export interface SqlQueryResponse { rows: SqlRow[] } +export type SqlQuerySqlFormat = 'csv' | 'json' | 'tsv' | 'txt' | 'yaml' | 'cbor' | 'smile' + export interface SqlTranslateRequest extends RequestBase { /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { @@ -20484,7 +20607,7 @@ export interface XpackInfoNativeCodeInformation { } export interface XpackInfoRequest extends RequestBase { - categories?: string[] + categories?: XpackInfoXPackCategory[] accept_enterprise?: boolean human?: boolean } @@ -20496,6 +20619,8 @@ export interface XpackInfoResponse { tagline: string } +export type XpackInfoXPackCategory = 'build' | 'features' | 'license' + export interface XpackUsageAnalytics extends XpackUsageBase { stats: XpackUsageAnalyticsStatistics }