diff --git a/docs/doc_examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc b/docs/doc_examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc index 627ba004d..3801b625f 100644 --- a/docs/doc_examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc +++ b/docs/doc_examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc @@ -5,6 +5,21 @@ ---- const response = await client.searchApplication.renderQuery({ name: "my-app", + body: { + params: { + query_string: "my first query", + text_fields: [ + { + name: "title", + boost: 5, + }, + { + name: "description", + boost: 1, + }, + ], + }, + }, }); console.log(response); ---- diff --git a/docs/doc_examples/0fbca60a487f5f22a4d51d73b2434cc4.asciidoc b/docs/doc_examples/0fbca60a487f5f22a4d51d73b2434cc4.asciidoc new file mode 100644 index 000000000..fadf2814c --- /dev/null +++ b/docs/doc_examples/0fbca60a487f5f22a4d51d73b2434cc4.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.indices.create({ + index: "elser-embeddings", + mappings: { + properties: { + content_embedding: { + type: "sparse_vector", + }, + content: { + type: "text", + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/10a16abe990288253ea25a1b1712fe3d.asciidoc b/docs/doc_examples/10a16abe990288253ea25a1b1712fe3d.asciidoc index d8a89c5f8..2520b36c1 100644 --- a/docs/doc_examples/10a16abe990288253ea25a1b1712fe3d.asciidoc +++ b/docs/doc_examples/10a16abe990288253ea25a1b1712fe3d.asciidoc @@ -5,6 +5,11 @@ ---- const response = await client.security.queryUser({ with_profile_uid: "true", + query: { + prefix: { + roles: "other", + }, + }, }); console.log(response); ---- diff --git a/docs/doc_examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc b/docs/doc_examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc index f9344050e..c5453ffaf 100644 --- a/docs/doc_examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc +++ b/docs/doc_examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc @@ -3,6 +3,25 @@ [source, js] ---- -const response = await client.simulate.ingest({}); +const response = await client.simulate.ingest({ + body: { + docs: [ + { + _index: "my-index", + _id: "123", + _source: { + foo: "bar", + }, + }, + { + _index: "my-index", + _id: "456", + _source: { + foo: "rab", + }, + }, + ], + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/19d60e4890cc57151d596326484d9076.asciidoc b/docs/doc_examples/19d60e4890cc57151d596326484d9076.asciidoc new file mode 100644 index 000000000..c5e05aa73 --- /dev/null +++ b/docs/doc_examples/19d60e4890cc57151d596326484d9076.asciidoc @@ -0,0 +1,11 @@ +// 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.ingest.deleteGeoipDatabase({ + id: "my-database-id", + body: null, +}); +console.log(response); +---- diff --git a/docs/doc_examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc b/docs/doc_examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc new file mode 100644 index 000000000..0c7d4b6f1 --- /dev/null +++ b/docs/doc_examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc @@ -0,0 +1,21 @@ +// 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.transport.request({ + method: "PUT", + path: "/_inference/sparse_embedding/my-elser-model", + body: { + service: "elser", + service_settings: { + adaptive_allocations: { + enabled: true, + min_number_of_allocations: 3, + max_number_of_allocations: 10, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc b/docs/doc_examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc index a0a9b3805..4853ab9a3 100644 --- a/docs/doc_examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc +++ b/docs/doc_examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc @@ -3,6 +3,12 @@ [source, js] ---- -const response = await client.security.oidcLogout({}); +const response = await client.security.oidcLogout({ + body: { + token: + "dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==", + refresh_token: "vLBPvmAB6KvwvJZr27cS", + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/2acf75803494fef29f9ca70671aa6be1.asciidoc b/docs/doc_examples/2acf75803494fef29f9ca70671aa6be1.asciidoc new file mode 100644 index 000000000..d5715eeeb --- /dev/null +++ b/docs/doc_examples/2acf75803494fef29f9ca70671aa6be1.asciidoc @@ -0,0 +1,10 @@ +// 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.security.bulkDeleteRole({ + names: ["my_admin_role", "superuser"], +}); +console.log(response); +---- diff --git a/docs/doc_examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc b/docs/doc_examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc index 32a8ae35c..44648b27c 100644 --- a/docs/doc_examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc +++ b/docs/doc_examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc @@ -6,6 +6,7 @@ const response = await client.esql.asyncQueryGet({ id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", wait_for_completion_timeout: "30s", + body: null, }); console.log(response); ---- diff --git a/docs/doc_examples/30fa37c9575fe81a0ea7c12cfc08e277.asciidoc b/docs/doc_examples/30fa37c9575fe81a0ea7c12cfc08e277.asciidoc new file mode 100644 index 000000000..04f772fe1 --- /dev/null +++ b/docs/doc_examples/30fa37c9575fe81a0ea7c12cfc08e277.asciidoc @@ -0,0 +1,25 @@ +// 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: "bad_example_index", + mappings: { + properties: { + field_1: { + type: "text", + copy_to: "field_2", + }, + field_2: { + type: "text", + copy_to: "field_3", + }, + field_3: { + type: "text", + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/398389933901b572a06a752bc780af7c.asciidoc b/docs/doc_examples/398389933901b572a06a752bc780af7c.asciidoc new file mode 100644 index 000000000..029b478da --- /dev/null +++ b/docs/doc_examples/398389933901b572a06a752bc780af7c.asciidoc @@ -0,0 +1,21 @@ +// 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.transport.request({ + method: "PUT", + path: "/_inference/completion/anthropic_completion", + body: { + service: "anthropic", + service_settings: { + api_key: "", + model_id: "", + }, + task_settings: { + max_tokens: 1024, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc b/docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc new file mode 100644 index 000000000..a00dcffd3 --- /dev/null +++ b/docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc @@ -0,0 +1,11 @@ +// 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.ingest.getGeoipDatabase({ + id: "my-database-id", + body: null, +}); +console.log(response); +---- diff --git a/docs/doc_examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc b/docs/doc_examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc index be4d5355c..b8e2ede87 100644 --- a/docs/doc_examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc +++ b/docs/doc_examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc @@ -3,6 +3,12 @@ [source, js] ---- -const response = await client.esql.asyncQuery({}); +const response = await client.esql.asyncQuery({ + body: { + query: + "\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ", + wait_for_completion_timeout: "2s", + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc b/docs/doc_examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc index c63439d9c..ab0617ea6 100644 --- a/docs/doc_examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc +++ b/docs/doc_examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc @@ -5,6 +5,7 @@ ---- const response = await client.esql.asyncQueryGet({ id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=", + body: null, }); console.log(response); ---- diff --git a/docs/doc_examples/44385b61342e20ea05f254015b2b04d7.asciidoc b/docs/doc_examples/44385b61342e20ea05f254015b2b04d7.asciidoc new file mode 100644 index 000000000..fc102c343 --- /dev/null +++ b/docs/doc_examples/44385b61342e20ea05f254015b2b04d7.asciidoc @@ -0,0 +1,10 @@ +// 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.security.bulkDeleteRole({ + names: ["my_admin_role", "my_user_role"], +}); +console.log(response); +---- diff --git a/docs/doc_examples/4982c547be1ad9455ae836990aea92c5.asciidoc b/docs/doc_examples/4982c547be1ad9455ae836990aea92c5.asciidoc new file mode 100644 index 000000000..b5d5d91f8 --- /dev/null +++ b/docs/doc_examples/4982c547be1ad9455ae836990aea92c5.asciidoc @@ -0,0 +1,11 @@ +// 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.startTrainedModelDeployment({ + model_id: "my_model", + deployment_id: "my_model_for_search", +}); +console.log(response); +---- diff --git a/docs/doc_examples/517d291044c3e4448b8804322616ab4a.asciidoc b/docs/doc_examples/517d291044c3e4448b8804322616ab4a.asciidoc new file mode 100644 index 000000000..67bb14a80 --- /dev/null +++ b/docs/doc_examples/517d291044c3e4448b8804322616ab4a.asciidoc @@ -0,0 +1,21 @@ +// 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.ingest.putPipeline({ + id: "elser_embeddings", + processors: [ + { + inference: { + model_id: "elser_embeddings", + input_output: { + input_field: "content", + output_field: "content_embedding", + }, + }, + }, + ], +}); +console.log(response); +---- diff --git a/docs/doc_examples/533087d787b48878a0bf3fa8d0851b64.asciidoc b/docs/doc_examples/533087d787b48878a0bf3fa8d0851b64.asciidoc new file mode 100644 index 000000000..9dfe27bbc --- /dev/null +++ b/docs/doc_examples/533087d787b48878a0bf3fa8d0851b64.asciidoc @@ -0,0 +1,11 @@ +// 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.ingest.deleteGeoipDatabase({ + id: "example-database-id", + body: null, +}); +console.log(response); +---- diff --git a/docs/doc_examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc b/docs/doc_examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc index 39d1ae3a1..dcf9e4b2e 100644 --- a/docs/doc_examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc +++ b/docs/doc_examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc @@ -3,6 +3,12 @@ [source, js] ---- -const response = await client.security.oidcPrepareAuthentication({}); +const response = await client.security.oidcPrepareAuthentication({ + body: { + realm: "oidc1", + state: "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO", + nonce: "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5", + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/5d3ee81bcf6ad57f39052c9065963cc3.asciidoc b/docs/doc_examples/5d3ee81bcf6ad57f39052c9065963cc3.asciidoc new file mode 100644 index 000000000..6079dac32 --- /dev/null +++ b/docs/doc_examples/5d3ee81bcf6ad57f39052c9065963cc3.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.indices.create({ + index: "test_index", + mappings: { + dynamic: "strict", + properties: { + description: { + properties: { + notes: { + type: "text", + copy_to: ["description.notes_raw"], + analyzer: "standard", + search_analyzer: "standard", + }, + notes_raw: { + type: "keyword", + }, + }, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc b/docs/doc_examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc new file mode 100644 index 000000000..e5c8b337a --- /dev/null +++ b/docs/doc_examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc @@ -0,0 +1,10 @@ +// 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.security.bulkDeleteRole({ + names: ["my_admin_role", "not_an_existing_role"], +}); +console.log(response); +---- diff --git a/docs/doc_examples/5f79c42b0f74fdf71359cef82843fad3.asciidoc b/docs/doc_examples/5f79c42b0f74fdf71359cef82843fad3.asciidoc deleted file mode 100644 index 08f2e3dc9..000000000 --- a/docs/doc_examples/5f79c42b0f74fdf71359cef82843fad3.asciidoc +++ /dev/null @@ -1,47 +0,0 @@ -// 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({ - query: { - intervals: { - my_text: { - all_of: { - intervals: [ - { - match: { - query: "the", - }, - }, - { - any_of: { - intervals: [ - { - match: { - query: "big", - }, - }, - { - match: { - query: "big bad", - }, - }, - ], - }, - }, - { - match: { - query: "wolf", - }, - }, - ], - max_gaps: 0, - ordered: true, - }, - }, - }, - }, -}); -console.log(response); ----- diff --git a/docs/doc_examples/d595b40bf1ea71923f9824d0f9c99c49.asciidoc b/docs/doc_examples/5fd002a018c589eb73fadad25889dbe9.asciidoc similarity index 97% rename from docs/doc_examples/d595b40bf1ea71923f9824d0f9c99c49.asciidoc rename to docs/doc_examples/5fd002a018c589eb73fadad25889dbe9.asciidoc index 6c2200014..d3d537545 100644 --- a/docs/doc_examples/d595b40bf1ea71923f9824d0f9c99c49.asciidoc +++ b/docs/doc_examples/5fd002a018c589eb73fadad25889dbe9.asciidoc @@ -29,7 +29,7 @@ const response = await client.transport.request({ }, { rule_id: "rule2", - type: "pinned", + type: "exclude", criteria: [ { type: "contains", diff --git a/docs/doc_examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc b/docs/doc_examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc new file mode 100644 index 000000000..041c60f0a --- /dev/null +++ b/docs/doc_examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc @@ -0,0 +1,59 @@ +// 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.security.bulkPutRole({ + roles: { + my_admin_role: { + cluster: ["all"], + indices: [ + { + names: ["index1", "index2"], + privileges: ["all"], + field_security: { + grant: ["title", "body"], + }, + query: '{"match": {"title": "foo"}}', + }, + ], + applications: [ + { + application: "myapp", + privileges: ["admin", "read"], + resources: ["*"], + }, + ], + run_as: ["other_user"], + metadata: { + version: 1, + }, + }, + my_user_role: { + cluster: ["all"], + indices: [ + { + names: ["index1"], + privileges: ["read"], + field_security: { + grant: ["title", "body"], + }, + query: '{"match": {"title": "foo"}}', + }, + ], + applications: [ + { + application: "myapp", + privileges: ["admin", "read"], + resources: ["*"], + }, + ], + run_as: ["other_user"], + metadata: { + version: 1, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/e619e896ce3dad9dcfc6f8700438be98.asciidoc b/docs/doc_examples/6ce6cac9df216c52371c2e77e6e07ba1.asciidoc similarity index 97% rename from docs/doc_examples/e619e896ce3dad9dcfc6f8700438be98.asciidoc rename to docs/doc_examples/6ce6cac9df216c52371c2e77e6e07ba1.asciidoc index 7ca935056..396d11fe4 100644 --- a/docs/doc_examples/e619e896ce3dad9dcfc6f8700438be98.asciidoc +++ b/docs/doc_examples/6ce6cac9df216c52371c2e77e6e07ba1.asciidoc @@ -29,7 +29,7 @@ const response = await client.transport.request({ }, { rule_id: "my-rule2", - type: "pinned", + type: "exclude", criteria: [ { type: "fuzzy", diff --git a/docs/doc_examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc b/docs/doc_examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc index a9e30c9b3..26bbeb20a 100644 --- a/docs/doc_examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc +++ b/docs/doc_examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc @@ -3,6 +3,10 @@ [source, js] ---- -const response = await client.security.bulkUpdateApiKeys({}); +const response = await client.security.bulkUpdateApiKeys({ + body: { + ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"], + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc b/docs/doc_examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc index d5d893637..107aebead 100644 --- a/docs/doc_examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc +++ b/docs/doc_examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc @@ -3,6 +3,33 @@ [source, js] ---- -const response = await client.textStructure.findMessageStructure({}); +const response = await client.textStructure.findMessageStructure({ + body: { + messages: [ + "[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128", + "[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]", + "[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]", + "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]", + "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]", + "[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]", + "[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]", + "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]", + "[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]", + "[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]", + "[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled", + "[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled", + "[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled", + "[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]", + "[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]", + "[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized", + "[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...", + ], + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/7c8f207e43115ea8f20d2298be5aaebc.asciidoc b/docs/doc_examples/7c8f207e43115ea8f20d2298be5aaebc.asciidoc index f9344050e..eb0ee1488 100644 --- a/docs/doc_examples/7c8f207e43115ea8f20d2298be5aaebc.asciidoc +++ b/docs/doc_examples/7c8f207e43115ea8f20d2298be5aaebc.asciidoc @@ -3,6 +3,37 @@ [source, js] ---- -const response = await client.simulate.ingest({}); +const response = await client.simulate.ingest({ + body: { + docs: [ + { + _index: "my-index", + _id: "id", + _source: { + foo: "bar", + }, + }, + { + _index: "my-index", + _id: "id", + _source: { + foo: "rab", + }, + }, + ], + pipeline_substitutions: { + "my-pipeline": { + processors: [ + { + set: { + field: "field3", + value: "value3", + }, + }, + ], + }, + }, + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/0b8fa90bc9aeeadb420ad785bd0b9953.asciidoc b/docs/doc_examples/7f2d511cb64743c006225e5933a14bb4.asciidoc similarity index 81% rename from docs/doc_examples/0b8fa90bc9aeeadb420ad785bd0b9953.asciidoc rename to docs/doc_examples/7f2d511cb64743c006225e5933a14bb4.asciidoc index 0ebd8a2a4..c492ea70d 100644 --- a/docs/doc_examples/0b8fa90bc9aeeadb420ad785bd0b9953.asciidoc +++ b/docs/doc_examples/7f2d511cb64743c006225e5933a14bb4.asciidoc @@ -19,6 +19,12 @@ const response = await client.security.putRole({ clusters: ["my_remote_cluster"], }, ], + remote_cluster: [ + { + privileges: ["monitor_enrich"], + clusters: ["my_remote_cluster"], + }, + ], }); console.log(response); ---- diff --git a/docs/doc_examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc b/docs/doc_examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc index a9e30c9b3..659fc0e47 100644 --- a/docs/doc_examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc +++ b/docs/doc_examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc @@ -3,6 +3,28 @@ [source, js] ---- -const response = await client.security.bulkUpdateApiKeys({}); +const response = await client.security.bulkUpdateApiKeys({ + body: { + ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"], + role_descriptors: { + "role-a": { + indices: [ + { + names: ["*"], + privileges: ["write"], + }, + ], + }, + }, + metadata: { + environment: { + level: 2, + trusted: true, + tags: ["production"], + }, + }, + expiration: "30d", + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/81aad155ff23b1b396833b1182c9d46b.asciidoc b/docs/doc_examples/81aad155ff23b1b396833b1182c9d46b.asciidoc new file mode 100644 index 000000000..a4744544e --- /dev/null +++ b/docs/doc_examples/81aad155ff23b1b396833b1182c9d46b.asciidoc @@ -0,0 +1,16 @@ +// 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.cat.shards({ + v: "true", +}); +console.log(response); + +const response1 = await client.cat.recovery({ + v: "true", + active_only: "true", +}); +console.log(response1); +---- diff --git a/docs/doc_examples/840f8c863c30b04abcf2dd66b846f157.asciidoc b/docs/doc_examples/840f8c863c30b04abcf2dd66b846f157.asciidoc new file mode 100644 index 000000000..b38af10e2 --- /dev/null +++ b/docs/doc_examples/840f8c863c30b04abcf2dd66b846f157.asciidoc @@ -0,0 +1,22 @@ +// 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.transport.request({ + method: "PUT", + path: "/_inference/text_embedding/my-e5-model", + body: { + service: "elasticsearch", + service_settings: { + adaptive_allocations: { + enabled: true, + min_number_of_allocations: 3, + max_number_of_allocations: 10, + }, + model_id: ".multilingual-e5-small", + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/72d33fbd72b0766b2f14ea27d9ccf0fa.asciidoc b/docs/doc_examples/8b144b3eb20872595fd7cbc6c245c7c8.asciidoc similarity index 71% rename from docs/doc_examples/72d33fbd72b0766b2f14ea27d9ccf0fa.asciidoc rename to docs/doc_examples/8b144b3eb20872595fd7cbc6c245c7c8.asciidoc index cb34ca584..3bccba38f 100644 --- a/docs/doc_examples/72d33fbd72b0766b2f14ea27d9ccf0fa.asciidoc +++ b/docs/doc_examples/8b144b3eb20872595fd7cbc6c245c7c8.asciidoc @@ -3,8 +3,8 @@ [source, js] ---- -const response = await client.indices.delete({ - index: "my-index", +const response = await client.security.queryRole({ + sort: ["name"], }); console.log(response); ---- diff --git a/docs/doc_examples/95c1b376652533c352bbf793c74d1b08.asciidoc b/docs/doc_examples/95c1b376652533c352bbf793c74d1b08.asciidoc new file mode 100644 index 000000000..4dcac513f --- /dev/null +++ b/docs/doc_examples/95c1b376652533c352bbf793c74d1b08.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.security.queryRole({ + query: { + match: { + description: { + query: "user access", + }, + }, + }, + size: 1, +}); +console.log(response); +---- diff --git a/docs/doc_examples/981b331db1404b39c1a612a135e4e76d.asciidoc b/docs/doc_examples/981b331db1404b39c1a612a135e4e76d.asciidoc new file mode 100644 index 000000000..b3393e3ec --- /dev/null +++ b/docs/doc_examples/981b331db1404b39c1a612a135e4e76d.asciidoc @@ -0,0 +1,16 @@ +// 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.ingest.putGeoipDatabase({ + id: "my-database-id", + body: { + name: "GeoIP2-Domain", + maxmind: { + account_id: "1025402", + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/9afa0844883b7471883aa378a8dd10b4.asciidoc b/docs/doc_examples/9afa0844883b7471883aa378a8dd10b4.asciidoc index bb5d71a23..46c6ad610 100644 --- a/docs/doc_examples/9afa0844883b7471883aa378a8dd10b4.asciidoc +++ b/docs/doc_examples/9afa0844883b7471883aa378a8dd10b4.asciidoc @@ -6,6 +6,36 @@ const response = await client.searchApplication.postBehavioralAnalyticsEvent({ collection_name: "my_analytics_collection", event_type: "search_click", + body: { + session: { + id: "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9", + }, + user: { + id: "5f26f01a-bbee-4202-9298-81261067abbd", + }, + search: { + query: "search term", + results: { + items: [ + { + document: { + id: "123", + index: "products", + }, + }, + ], + total_results: 10, + }, + sort: { + name: "relevance", + }, + search_application: "website", + }, + document: { + id: "123", + index: "products", + }, + }, }); console.log(response); ---- diff --git a/docs/doc_examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc b/docs/doc_examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc index 395ba9b0f..64e6db48e 100644 --- a/docs/doc_examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc +++ b/docs/doc_examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc @@ -3,6 +3,14 @@ [source, js] ---- -const response = await client.security.oidcAuthenticate({}); +const response = await client.security.oidcAuthenticate({ + body: { + redirect_uri: + "https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", + state: "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I", + nonce: "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM", + realm: "oidc1", + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/a162eb50853331c80596f5994e9d1c38.asciidoc b/docs/doc_examples/a162eb50853331c80596f5994e9d1c38.asciidoc index 82a81bced..6b9a54625 100644 --- a/docs/doc_examples/a162eb50853331c80596f5994e9d1c38.asciidoc +++ b/docs/doc_examples/a162eb50853331c80596f5994e9d1c38.asciidoc @@ -5,6 +5,11 @@ ---- const response = await client.searchApplication.renderQuery({ name: "my_search_application", + body: { + params: { + query_string: "rock climbing", + }, + }, }); console.log(response); ---- diff --git a/docs/doc_examples/a225fc8c134cb21a85bc6025dac9368b.asciidoc b/docs/doc_examples/a225fc8c134cb21a85bc6025dac9368b.asciidoc new file mode 100644 index 000000000..8cfc3b071 --- /dev/null +++ b/docs/doc_examples/a225fc8c134cb21a85bc6025dac9368b.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.transport.request({ + method: "PUT", + path: "/_inference/sparse_embedding/elser_embeddings", + body: { + service: "elser", + service_settings: { + num_allocations: 1, + num_threads: 1, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/aebf9cc593fcf0d4ca08f8b61b67bf17.asciidoc b/docs/doc_examples/aebf9cc593fcf0d4ca08f8b61b67bf17.asciidoc new file mode 100644 index 000000000..af5ed0954 --- /dev/null +++ b/docs/doc_examples/aebf9cc593fcf0d4ca08f8b61b67bf17.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.snapshot.createRepository({ + name: "my_backup", + repository: { + type: "azure", + settings: { + client: "secondary", + container: "my_container", + base_path: "snapshots_prefix", + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc b/docs/doc_examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc index 82a81bced..6ce163623 100644 --- a/docs/doc_examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc +++ b/docs/doc_examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc @@ -5,6 +5,7 @@ ---- const response = await client.searchApplication.renderQuery({ name: "my_search_application", + body: null, }); console.log(response); ---- diff --git a/docs/doc_examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc b/docs/doc_examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc index 7ffe922db..30687161f 100644 --- a/docs/doc_examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc +++ b/docs/doc_examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc @@ -211,6 +211,7 @@ console.log(response); const response1 = await client.textStructure.findFieldStructure({ index: "test-logs", field: "message", + body: null, }); console.log(response1); ---- diff --git a/docs/doc_examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc b/docs/doc_examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc index f9344050e..06b5f58ec 100644 --- a/docs/doc_examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc +++ b/docs/doc_examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc @@ -3,6 +3,36 @@ [source, js] ---- -const response = await client.simulate.ingest({}); +const response = await client.simulate.ingest({ + body: { + docs: [ + { + _index: "my-index", + _id: "123", + _source: { + foo: "bar", + }, + }, + { + _index: "my-index", + _id: "456", + _source: { + foo: "rab", + }, + }, + ], + pipeline_substitutions: { + "my-pipeline": { + processors: [ + { + uppercase: { + field: "foo", + }, + }, + ], + }, + }, + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/bfb0db2a72f22c9c2046119777efbb43.asciidoc b/docs/doc_examples/bfb0db2a72f22c9c2046119777efbb43.asciidoc new file mode 100644 index 000000000..6936bb686 --- /dev/null +++ b/docs/doc_examples/bfb0db2a72f22c9c2046119777efbb43.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: "elser-embeddings", + query: { + sparse_vector: { + field: "content_embedding", + inference_id: "elser_embeddings", + query: "How to avoid muscle soreness after running?", + }, + }, + _source: ["id", "content"], +}); +console.log(response); +---- diff --git a/docs/doc_examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc b/docs/doc_examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc index a9e30c9b3..2a14bb328 100644 --- a/docs/doc_examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc +++ b/docs/doc_examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc @@ -3,6 +3,11 @@ [source, js] ---- -const response = await client.security.bulkUpdateApiKeys({}); +const response = await client.security.bulkUpdateApiKeys({ + body: { + ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"], + role_descriptors: {}, + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/c6f07c53eda4db77305bb14751b3263f.asciidoc b/docs/doc_examples/c6f07c53eda4db77305bb14751b3263f.asciidoc deleted file mode 100644 index 10a1ab91e..000000000 --- a/docs/doc_examples/c6f07c53eda4db77305bb14751b3263f.asciidoc +++ /dev/null @@ -1,50 +0,0 @@ -// 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.snapshot.createRepository({ - name: "my_backup1", - repository: { - type: "azure", - }, -}); -console.log(response); - -const response1 = await client.snapshot.createRepository({ - name: "my_backup2", - repository: { - type: "azure", - settings: { - container: "backup-container", - base_path: "backups", - chunk_size: "32MB", - compress: true, - }, - }, -}); -console.log(response1); - -const response2 = await client.snapshot.createRepository({ - name: "my_backup3", - repository: { - type: "azure", - settings: { - client: "secondary", - }, - }, -}); -console.log(response2); - -const response3 = await client.snapshot.createRepository({ - name: "my_backup4", - repository: { - type: "azure", - settings: { - client: "secondary", - location_mode: "primary_only", - }, - }, -}); -console.log(response3); ----- diff --git a/docs/doc_examples/c9373ff5ed6b026173428fbb92ca2d9f.asciidoc b/docs/doc_examples/c9373ff5ed6b026173428fbb92ca2d9f.asciidoc new file mode 100644 index 000000000..21b881926 --- /dev/null +++ b/docs/doc_examples/c9373ff5ed6b026173428fbb92ca2d9f.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.reindex({ + wait_for_completion: "false", + source: { + index: "test-data", + size: 50, + }, + dest: { + index: "elser-embeddings", + pipeline: "elser_embeddings", + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/d27591881da6f5767523b1beb233adc7.asciidoc b/docs/doc_examples/d27591881da6f5767523b1beb233adc7.asciidoc new file mode 100644 index 000000000..907c0a556 --- /dev/null +++ b/docs/doc_examples/d27591881da6f5767523b1beb233adc7.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.snapshot.createRepository({ + name: "my_backup", + repository: { + type: "azure", + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc b/docs/doc_examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc index 39d1ae3a1..51dea2365 100644 --- a/docs/doc_examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc +++ b/docs/doc_examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc @@ -3,6 +3,11 @@ [source, js] ---- -const response = await client.security.oidcPrepareAuthentication({}); +const response = await client.security.oidcPrepareAuthentication({ + body: { + iss: "http://127.0.0.1:8080", + login_hint: "this_is_an_opaque_string", + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/dfce1be1d035aff0b8fdf4a8839f7795.asciidoc b/docs/doc_examples/dfce1be1d035aff0b8fdf4a8839f7795.asciidoc new file mode 100644 index 000000000..c46ec2537 --- /dev/null +++ b/docs/doc_examples/dfce1be1d035aff0b8fdf4a8839f7795.asciidoc @@ -0,0 +1,15 @@ +// 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.updateTrainedModelDeployment({ + model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english", + adaptive_allocations: { + enabled: true, + min_number_of_allocations: 3, + max_number_of_allocations: 10, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc b/docs/doc_examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc index 39d1ae3a1..5a02c157a 100644 --- a/docs/doc_examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc +++ b/docs/doc_examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc @@ -3,6 +3,10 @@ [source, js] ---- -const response = await client.security.oidcPrepareAuthentication({}); +const response = await client.security.oidcPrepareAuthentication({ + body: { + realm: "oidc1", + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/e4ea514eb9a01716d9bbc5aa04ee0252.asciidoc b/docs/doc_examples/e4ea514eb9a01716d9bbc5aa04ee0252.asciidoc index a73d17637..7207d8204 100644 --- a/docs/doc_examples/e4ea514eb9a01716d9bbc5aa04ee0252.asciidoc +++ b/docs/doc_examples/e4ea514eb9a01716d9bbc5aa04ee0252.asciidoc @@ -3,6 +3,12 @@ [source, js] ---- -const response = await client.security.queryUser({}); +const response = await client.security.queryUser({ + query: { + prefix: { + roles: "other", + }, + }, +}); console.log(response); ---- diff --git a/docs/doc_examples/e7811867397b305efbbe8925d8a01c1a.asciidoc b/docs/doc_examples/e7811867397b305efbbe8925d8a01c1a.asciidoc deleted file mode 100644 index 97615c4ce..000000000 --- a/docs/doc_examples/e7811867397b305efbbe8925d8a01c1a.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -// 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({ - query: { - intervals: { - my_text: { - any_of: { - intervals: [ - { - match: { - query: "the big bad wolf", - ordered: true, - max_gaps: 0, - }, - }, - { - match: { - query: "the big wolf", - ordered: true, - max_gaps: 0, - }, - }, - ], - }, - }, - }, - }, -}); -console.log(response); ----- diff --git a/docs/doc_examples/eb141f8df8ead40ff7440b623ea92267.asciidoc b/docs/doc_examples/eb141f8df8ead40ff7440b623ea92267.asciidoc new file mode 100644 index 000000000..55f84f169 --- /dev/null +++ b/docs/doc_examples/eb141f8df8ead40ff7440b623ea92267.asciidoc @@ -0,0 +1,24 @@ +// 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: "good_example_index", + mappings: { + properties: { + field_1: { + type: "text", + copy_to: ["field_2", "field_3"], + }, + field_2: { + type: "text", + }, + field_3: { + type: "text", + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc b/docs/doc_examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc new file mode 100644 index 000000000..a9cdeb962 --- /dev/null +++ b/docs/doc_examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc @@ -0,0 +1,59 @@ +// 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.security.bulkPutRole({ + roles: { + my_admin_role: { + cluster: ["bad_cluster_privilege"], + indices: [ + { + names: ["index1", "index2"], + privileges: ["all"], + field_security: { + grant: ["title", "body"], + }, + query: '{"match": {"title": "foo"}}', + }, + ], + applications: [ + { + application: "myapp", + privileges: ["admin", "read"], + resources: ["*"], + }, + ], + run_as: ["other_user"], + metadata: { + version: 1, + }, + }, + my_user_role: { + cluster: ["all"], + indices: [ + { + names: ["index1"], + privileges: ["read"], + field_security: { + grant: ["title", "body"], + }, + query: '{"match": {"title": "foo"}}', + }, + ], + applications: [ + { + application: "myapp", + privileges: ["admin", "read"], + resources: ["*"], + }, + ], + run_as: ["other_user"], + metadata: { + version: 1, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 8aacbc5a4..d10a2c678 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -648,6 +648,12 @@ client.msearch({ ... }) ** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. ** *`ignore_throttled` (Optional, boolean)*: If true, concrete, expanded or aliased indices are ignored when frozen. ** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response. +** *`include_named_queries_score` (Optional, boolean)*: Indicates whether hit.matched_queries should be rendered as a map that includes +the name of the matched query associated with its score (true) +or as an array containing the name of the matched queries (false) +This functionality reruns each named query on every hit in a search response. +Typically, this adds a small overhead to a request. +However, using computationally expensive named queries on a large number of hits may add significant overhead. ** *`max_concurrent_searches` (Optional, number)*: Maximum number of concurrent searches the multi search API can execute. ** *`max_concurrent_shard_requests` (Optional, number)*: Maximum number of concurrent shard requests that each sub-search request executes per node. ** *`pre_filter_shard_size` (Optional, number)*: Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. @@ -1003,6 +1009,12 @@ If the request can target data streams, this argument determines whether wildcar Supports a list of values, such as `open,hidden`. ** *`ignore_throttled` (Optional, boolean)*: If `true`, concrete, expanded or aliased indices will be ignored when frozen. ** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index. +** *`include_named_queries_score` (Optional, boolean)*: Indicates whether hit.matched_queries should be rendered as a map that includes +the name of the matched query associated with its score (true) +or as an array containing the name of the matched queries (false) +This functionality reruns each named query on every hit in a search response. +Typically, this adds a small overhead to a request. +However, using computationally expensive named queries on a large number of hits may add significant overhead. ** *`lenient` (Optional, boolean)*: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. This parameter can only be used when the `q` query string parameter is specified. ** *`max_concurrent_shard_requests` (Optional, number)*: Defines the number of concurrent shard requests per node this search executes concurrently. @@ -2534,7 +2546,7 @@ client.cluster.health({ ... }) ==== Arguments * *Request (object):* -** *`index` (Optional, string | string[])*: List of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or *. +** *`index` (Optional, string | string[])*: List of data streams, indices, and index aliases used to limit the request. Wildcard expressions (`*`) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or `*`. ** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. ** *`level` (Optional, Enum("cluster" | "indices" | "shards"))*: Can be one of cluster, indices or shards. Controls the details level of the health information returned. ** *`local` (Optional, boolean)*: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. @@ -10572,7 +10584,7 @@ client.synonyms.putSynonym({ id, synonyms_set }) * *Request (object):* ** *`id` (string)*: The id of the synonyms set to be created or updated -** *`synonyms_set` ({ id, synonyms }[])*: The synonym set information to update +** *`synonyms_set` ({ id, synonyms } | { id, synonyms }[])*: The synonym set information to update [discrete] ==== put_synonym_rule diff --git a/src/api/types.ts b/src/api/types.ts index 71720b2d0..29b18a259 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -773,6 +773,7 @@ export interface MsearchRequest extends RequestBase { expand_wildcards?: ExpandWildcards ignore_throttled?: boolean ignore_unavailable?: boolean + include_named_queries_score?: boolean max_concurrent_searches?: long max_concurrent_shard_requests?: long pre_filter_shard_size?: long @@ -1132,6 +1133,7 @@ export interface SearchRequest extends RequestBase { expand_wildcards?: ExpandWildcards ignore_throttled?: boolean ignore_unavailable?: boolean + include_named_queries_score?: boolean lenient?: boolean max_concurrent_shard_requests?: long min_compatible_shard_node?: VersionString @@ -1421,7 +1423,7 @@ export interface SearchHit { fields?: Record highlight?: Record inner_hits?: Record - matched_queries?: string[] + matched_queries?: string[] | Record _nested?: SearchNestedIdentity _ignored?: string[] ignored_field_values?: Record @@ -2294,6 +2296,7 @@ export interface KnnQuery extends QueryDslQueryBase { query_vector?: QueryVector query_vector_builder?: QueryVectorBuilder num_candidates?: integer + k?: integer filter?: QueryDslQueryContainer | QueryDslQueryContainer[] similarity?: float } @@ -13859,7 +13862,7 @@ export interface MlTrainedModelDeploymentStats { error_count: integer inference_count: integer model_id: Id - nodes: MlTrainedModelDeploymentNodesStats + nodes: MlTrainedModelDeploymentNodesStats[] number_of_allocations: integer queue_capacity: integer rejected_execution_count: integer @@ -13894,7 +13897,7 @@ export interface MlTrainedModelInferenceStats { failure_count: integer inference_count: integer missing_all_fields_count: integer - timestamp: DateTime + timestamp: EpochTime } export interface MlTrainedModelLocation { @@ -18281,7 +18284,7 @@ export interface SynonymsGetSynonymsSetsSynonymsSetItem { export interface SynonymsPutSynonymRequest extends RequestBase { id: Id - synonyms_set: SynonymsSynonymRule[] + synonyms_set: SynonymsSynonymRule | SynonymsSynonymRule[] } export interface SynonymsPutSynonymResponse { diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts index 5203f3ca3..3a0705d02 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -801,6 +801,7 @@ export interface MsearchRequest extends RequestBase { expand_wildcards?: ExpandWildcards ignore_throttled?: boolean ignore_unavailable?: boolean + include_named_queries_score?: boolean max_concurrent_searches?: long max_concurrent_shard_requests?: long pre_filter_shard_size?: long @@ -1184,6 +1185,7 @@ export interface SearchRequest extends RequestBase { expand_wildcards?: ExpandWildcards ignore_throttled?: boolean ignore_unavailable?: boolean + include_named_queries_score?: boolean lenient?: boolean max_concurrent_shard_requests?: long min_compatible_shard_node?: VersionString @@ -1476,7 +1478,7 @@ export interface SearchHit { fields?: Record highlight?: Record inner_hits?: Record - matched_queries?: string[] + matched_queries?: string[] | Record _nested?: SearchNestedIdentity _ignored?: string[] ignored_field_values?: Record @@ -2367,6 +2369,7 @@ export interface KnnQuery extends QueryDslQueryBase { query_vector?: QueryVector query_vector_builder?: QueryVectorBuilder num_candidates?: integer + k?: integer filter?: QueryDslQueryContainer | QueryDslQueryContainer[] similarity?: float } @@ -14094,7 +14097,7 @@ export interface MlTrainedModelDeploymentStats { error_count: integer inference_count: integer model_id: Id - nodes: MlTrainedModelDeploymentNodesStats + nodes: MlTrainedModelDeploymentNodesStats[] number_of_allocations: integer queue_capacity: integer rejected_execution_count: integer @@ -14129,7 +14132,7 @@ export interface MlTrainedModelInferenceStats { failure_count: integer inference_count: integer missing_all_fields_count: integer - timestamp: DateTime + timestamp: EpochTime } export interface MlTrainedModelLocation { @@ -18756,7 +18759,7 @@ export interface SynonymsPutSynonymRequest extends RequestBase { id: Id /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { - synonyms_set: SynonymsSynonymRule[] + synonyms_set: SynonymsSynonymRule | SynonymsSynonymRule[] } }