Skip to content

Commit 424cc94

Browse files
Auto-generated code for 8.15 (#2370)
1 parent 7aca5cf commit 424cc94

28 files changed

+699
-15
lines changed

docs/doc_examples/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc renamed to docs/doc_examples/0393ca5a2942e1f00ed87546d0d50732.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[source, js]
55
----
66
const response = await client.indices.create({
7-
index: "my-index-000002",
7+
index: "my-index-000003",
88
mappings: {
99
properties: {
1010
metrics: {
@@ -29,7 +29,7 @@ const response = await client.indices.create({
2929
console.log(response);
3030
3131
const response1 = await client.indices.getMapping({
32-
index: "my-index-000002",
32+
index: "my-index-000003",
3333
});
3434
console.log(response1);
3535
----

docs/doc_examples/840f8c863c30b04abcf2dd66b846f157.asciidoc renamed to docs/doc_examples/083b92e8ea264e49bf9fd40fc6a3094b.asciidoc

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const response = await client.inference.put({
1414
min_number_of_allocations: 3,
1515
max_number_of_allocations: 10,
1616
},
17+
num_threads: 1,
1718
model_id: ".multilingual-e5-small",
1819
},
1920
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.search({
7+
index: "restaurants",
8+
retriever: {
9+
knn: {
10+
field: "vector",
11+
query_vector: [10, 22, 77],
12+
k: 10,
13+
num_candidates: 10,
14+
},
15+
},
16+
});
17+
console.log(response);
18+
----

docs/doc_examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc renamed to docs/doc_examples/565386eee0951865a684e41fab53b40c.asciidoc

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const response = await client.inference.put({
1414
min_number_of_allocations: 3,
1515
max_number_of_allocations: 10,
1616
},
17+
num_threads: 1,
1718
},
1819
},
1920
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.indices.create({
7+
index: "my-index-000002",
8+
mappings: {
9+
properties: {
10+
inference_field: {
11+
type: "semantic_text",
12+
inference_id: "my-elser-endpoint-for-ingest",
13+
search_inference_id: "my-elser-endpoint-for-search",
14+
},
15+
},
16+
},
17+
});
18+
console.log(response);
19+
----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.inference.put({
7+
task_type: "rerank",
8+
inference_id: "my-msmarco-minilm-model",
9+
inference_config: {
10+
service: "elasticsearch",
11+
service_settings: {
12+
num_allocations: 1,
13+
num_threads: 1,
14+
model_id: "cross-encoder__ms-marco-minilm-l-6-v2",
15+
},
16+
},
17+
});
18+
console.log(response);
19+
----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.search({
7+
index: "movies",
8+
retriever: {
9+
rrf: {
10+
retrievers: [
11+
{
12+
standard: {
13+
query: {
14+
sparse_vector: {
15+
field: "plot_embedding",
16+
inference_id: "my-elser-model",
17+
query: "films that explore psychological depths",
18+
},
19+
},
20+
},
21+
},
22+
{
23+
standard: {
24+
query: {
25+
multi_match: {
26+
query: "crime",
27+
fields: ["plot", "title"],
28+
},
29+
},
30+
},
31+
},
32+
{
33+
knn: {
34+
field: "vector",
35+
query_vector: [10, 22, 77],
36+
k: 10,
37+
num_candidates: 10,
38+
},
39+
},
40+
],
41+
},
42+
},
43+
});
44+
console.log(response);
45+
----

docs/doc_examples/a4ec42130f3c75fc9d1d5f7cb6222cd5.asciidoc renamed to docs/doc_examples/745864ef2427188241a4702b94ea57be.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const response = await client.search({
1111
filter: {
1212
range: {
1313
price: {
14-
to: "500",
14+
lte: "500",
1515
},
1616
},
1717
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.indices.create({
7+
index: "my-index-000004",
8+
mappings: {
9+
properties: {
10+
metrics: {
11+
subobjects: "auto",
12+
properties: {
13+
time: {
14+
type: "object",
15+
properties: {
16+
min: {
17+
type: "long",
18+
},
19+
},
20+
},
21+
to: {
22+
type: "object",
23+
properties: {
24+
inner_metrics: {
25+
type: "object",
26+
subobjects: "auto",
27+
properties: {
28+
time: {
29+
type: "object",
30+
properties: {
31+
max: {
32+
type: "long",
33+
},
34+
},
35+
},
36+
},
37+
},
38+
},
39+
},
40+
},
41+
},
42+
},
43+
},
44+
});
45+
console.log(response);
46+
47+
const response1 = await client.indices.getMapping({
48+
index: "my-index-000004",
49+
});
50+
console.log(response1);
51+
----

docs/doc_examples/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc renamed to docs/doc_examples/8417d8d35ec5fc5665dfb2f95d6d1101.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const response = await client.search({
1717
{
1818
range: {
1919
"result.execution_time": {
20-
from: "now-10s",
20+
gte: "now-10s",
2121
},
2222
},
2323
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.search({
7+
index: "my-index",
8+
query: {
9+
semantic: {
10+
field: "inference_field",
11+
query: "mountain lake",
12+
inner_hits: {
13+
from: 1,
14+
size: 1,
15+
},
16+
},
17+
},
18+
});
19+
console.log(response);
20+
----

docs/doc_examples/bdb671866e2f0195f8dfbdb7f20bf591.asciidoc renamed to docs/doc_examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ const response = await client.inference.put({
99
inference_config: {
1010
service: "elser",
1111
service_settings: {
12-
num_allocations: 1,
12+
adaptive_allocations: {
13+
enabled: true,
14+
min_number_of_allocations: 3,
15+
max_number_of_allocations: 10,
16+
},
1317
num_threads: 1,
1418
},
1519
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.search({
7+
index: "my-index",
8+
query: {
9+
semantic: {
10+
field: "inference_field",
11+
query: "mountain lake",
12+
inner_hits: {},
13+
},
14+
},
15+
});
16+
console.log(response);
17+
----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.search({
7+
index: "restaurants",
8+
retriever: {
9+
rrf: {
10+
retrievers: [
11+
{
12+
standard: {
13+
query: {
14+
multi_match: {
15+
query: "Austria",
16+
fields: ["city", "region"],
17+
},
18+
},
19+
},
20+
},
21+
{
22+
knn: {
23+
field: "vector",
24+
query_vector: [10, 22, 77],
25+
k: 10,
26+
num_candidates: 10,
27+
},
28+
},
29+
],
30+
rank_constant: 1,
31+
rank_window_size: 50,
32+
},
33+
},
34+
});
35+
console.log(response);
36+
----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.search({
7+
index: "movies",
8+
retriever: {
9+
text_similarity_reranker: {
10+
retriever: {
11+
standard: {
12+
query: {
13+
match: {
14+
genre: "drama",
15+
},
16+
},
17+
},
18+
},
19+
field: "plot",
20+
inference_id: "my-msmarco-minilm-model",
21+
inference_text: "films that explore psychological depths",
22+
},
23+
},
24+
});
25+
console.log(response);
26+
----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.index({
7+
index: "my-index",
8+
id: "lake_tahoe",
9+
document: {
10+
inference_field: [
11+
"Lake Tahoe is the largest alpine lake in North America",
12+
"When hiking in the area, please be on alert for bears",
13+
],
14+
},
15+
});
16+
console.log(response);
17+
----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.search({
7+
index: "index",
8+
retriever: {
9+
text_similarity_reranker: {
10+
retriever: {
11+
standard: {
12+
query: {
13+
match_phrase: {
14+
text: "landmark in Paris",
15+
},
16+
},
17+
},
18+
},
19+
field: "text",
20+
inference_id: "my-cohere-rerank-model",
21+
inference_text: "Most famous landmark in Paris",
22+
rank_window_size: 100,
23+
min_score: 0.5,
24+
},
25+
},
26+
});
27+
console.log(response);
28+
----

0 commit comments

Comments
 (0)