Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-generated code for 8.16 #2597

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/doc_examples/00ad41bde67beac991534ae0e04b1296.asciidoc
Original file line number Diff line number Diff line change
@@ -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.indices.getDataStream({
name: "my-data-stream",
filter_path: "data_streams.indices.index_name",
});
console.log(response);
----
15 changes: 15 additions & 0 deletions docs/doc_examples/0f028f71f04c1d569fab402869565a84.asciidoc
Original file line number Diff line number Diff line change
@@ -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.indices.putSettings({
index: ".reindexed-v9-ml-anomalies-custom-example",
settings: {
index: {
number_of_replicas: "<original_number_of_replicas>",
},
},
});
console.log(response);
----
11 changes: 11 additions & 0 deletions docs/doc_examples/12adea5d76f73d94d80d42f53f67563f.asciidoc
Original file line number Diff line number Diff line change
@@ -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.indices.addBlock({
index: ".ml-anomalies-custom-example",
block: "read_only",
});
console.log(response);
----
19 changes: 19 additions & 0 deletions docs/doc_examples/1ead35c954963e83f89872048dabdbe9.asciidoc
Original file line number Diff line number Diff line change
@@ -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.security.queryRole({
query: {
bool: {
must_not: {
term: {
"metadata._reserved": true,
},
},
},
},
sort: ["name"],
});
console.log(response);
----
11 changes: 11 additions & 0 deletions docs/doc_examples/272e27bf1fcc4fe5dbd4092679dd0342.asciidoc
Original file line number Diff line number Diff line change
@@ -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.indices.addBlock({
index: ".ml-anomalies-custom-example",
block: "write",
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
const response = await client.indices.create({
index: "test-index",
query: {
semantic: {
field: "my_semantic_field",
match: {
my_field: "Which country is Paris in?",
},
},
highlight: {
fields: {
my_semantic_field: {
my_field: {
type: "semantic",
number_of_fragments: 2,
order: "score",
Expand Down
28 changes: 28 additions & 0 deletions docs/doc_examples/31832bd71c31c46a1ccf8d1c210d89d4.asciidoc
Original file line number Diff line number Diff line change
@@ -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: "my-index-*",
query: {
bool: {
must: [
{
match: {
"user.id": "kimchy",
},
},
],
must_not: [
{
terms: {
_index: ["my-index-01"],
},
},
],
},
},
});
console.log(response);
----
31 changes: 31 additions & 0 deletions docs/doc_examples/32c8c86702ccd68eb70f1573409c2a1f.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// 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.ilm.putLifecycle({
name: "my_policy",
policy: {
phases: {
hot: {
actions: {
rollover: {
max_primary_shard_size: "50gb",
},
searchable_snapshot: {
snapshot_repository: "backing_repo",
replicate_for: "14d",
},
},
},
delete: {
min_age: "28d",
actions: {
delete: {},
},
},
},
},
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ const response = await client.search({
retriever: {
rescorer: {
rescore: {
window_size: 50,
query: {
window_size: 50,
rescore_query: {
script_score: {
query: {
match_all: {},
},
script: {
source:
"cosineSimilarity(params.queryVector, 'product-vector_final_stage') + 1.0",
Expand Down
23 changes: 23 additions & 0 deletions docs/doc_examples/3722dad876023e0757138dd5a6d3240e.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// 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",
settings: {
index: {
number_of_shards: 3,
"blocks.write": true,
},
},
mappings: {
properties: {
field1: {
type: "text",
},
},
},
});
console.log(response);
----
19 changes: 19 additions & 0 deletions docs/doc_examples/3a204b57072a104d9b50f3a9e064a8f6.asciidoc
Original file line number Diff line number Diff line change
@@ -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.search({
index: ".ml-anomalies-custom-example",
size: 0,
aggs: {
job_ids: {
terms: {
field: "job_id",
size: 100,
},
},
},
});
console.log(response);
----
61 changes: 61 additions & 0 deletions docs/doc_examples/3bc4a3681e3ea9cb3de49f72085807d8.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// 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: "retrievers_example",
retriever: {
linear: {
retrievers: [
{
retriever: {
standard: {
query: {
function_score: {
query: {
term: {
topic: "ai",
},
},
functions: [
{
script_score: {
script: {
source: "doc['timestamp'].value.millis",
},
},
},
],
boost_mode: "replace",
},
},
sort: {
timestamp: {
order: "asc",
},
},
},
},
weight: 2,
normalizer: "minmax",
},
{
retriever: {
knn: {
field: "vector",
query_vector: [0.23, 0.67, 0.89],
k: 3,
num_candidates: 5,
},
},
weight: 1.5,
},
],
rank_window_size: 10,
},
},
_source: false,
});
console.log(response);
----
17 changes: 17 additions & 0 deletions docs/doc_examples/4de4bb55bbc0a76c75d256f245a3ee3f.asciidoc
Original file line number Diff line number Diff line change
@@ -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.inference.put({
task_type: "sparse_embedding",
inference_id: "elser-model-eis",
inference_config: {
service: "elastic",
service_settings: {
model_name: "elser",
},
},
});
console.log(response);
----
12 changes: 12 additions & 0 deletions docs/doc_examples/537bce129338d9227bccb6a0283dab45.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// 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.cluster.putSettings({
persistent: {
"migrate.data_stream_reindex_max_request_per_second": 10000,
},
});
console.log(response);
----
10 changes: 10 additions & 0 deletions docs/doc_examples/59aa5216630f80c5dc298fc5bba4a819.asciidoc
Original file line number Diff line number Diff line change
@@ -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.indices.getSettings({
index: ".reindexed-v9-ml-anomalies-custom-example",
});
console.log(response);
----
23 changes: 23 additions & 0 deletions docs/doc_examples/6baf72c04d48cb04c2f8be609ff3b3b5.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// 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: "test-index",
query: {
match: {
my_semantic_field: "Which country is Paris in?",
},
},
highlight: {
fields: {
my_semantic_field: {
number_of_fragments: 2,
order: "score",
},
},
},
});
console.log(response);
----
16 changes: 16 additions & 0 deletions docs/doc_examples/6e498b9dc753b94abf2618c407fa5cd8.asciidoc
Original file line number Diff line number Diff line change
@@ -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.reindex({
wait_for_completion: "false",
source: {
index: ".ml-anomalies-custom-example",
},
dest: {
index: ".reindexed-v9-ml-anomalies-custom-example",
},
});
console.log(response);
----
15 changes: 15 additions & 0 deletions docs/doc_examples/8621c05cc7cf3880bde751f6670a0c3a.asciidoc
Original file line number Diff line number Diff line change
@@ -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.indices.putSettings({
index: ".reindexed-v9-ml-anomalies-custom-example",
settings: {
index: {
number_of_replicas: 0,
},
},
});
console.log(response);
----
12 changes: 12 additions & 0 deletions docs/doc_examples/89f547649895176c246bb8c41313ff21.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// 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.esql.query({
query:
'\nFROM library\n| EVAL year = DATE_EXTRACT("year", release_date)\n| WHERE page_count > ? AND match(author, ?, {"minimum_should_match": ?})\n| LIMIT 5\n',
params: [300, "Frank Herbert", 2],
});
console.log(response);
----
10 changes: 10 additions & 0 deletions docs/doc_examples/8c47c80139f40f25db44f5781ca2dfbe.asciidoc
Original file line number Diff line number Diff line change
@@ -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.indices.getAlias({
index: ".ml-anomalies-custom-example",
});
console.log(response);
----
Loading