Skip to content

Commit 75b7b07

Browse files
Auto-generated code for 8.17 (#2503)
1 parent cc9d856 commit 75b7b07

File tree

118 files changed

+1661
-820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1661
-820
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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: "retrievers_example",
8+
retriever: {
9+
rrf: {
10+
retrievers: [
11+
{
12+
standard: {
13+
query: {
14+
range: {
15+
year: {
16+
gt: 2023,
17+
},
18+
},
19+
},
20+
},
21+
},
22+
{
23+
standard: {
24+
query: {
25+
term: {
26+
topic: "elastic",
27+
},
28+
},
29+
},
30+
},
31+
],
32+
rank_window_size: 10,
33+
rank_constant: 1,
34+
},
35+
},
36+
_source: false,
37+
aggs: {
38+
topics: {
39+
terms: {
40+
field: "topic",
41+
},
42+
},
43+
},
44+
});
45+
console.log(response);
46+
----
Lines changed: 18 additions & 0 deletions
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.inference.put({
7+
task_type: "rerank",
8+
inference_id: "my-rerank-model",
9+
inference_config: {
10+
service: "cohere",
11+
service_settings: {
12+
model_id: "rerank-english-v3.0",
13+
api_key: "{{COHERE_API_KEY}}",
14+
},
15+
},
16+
});
17+
console.log(response);
18+
----
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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: "retrievers_example_nested",
8+
retriever: {
9+
rrf: {
10+
retrievers: [
11+
{
12+
standard: {
13+
query: {
14+
nested: {
15+
path: "nested_field",
16+
inner_hits: {
17+
name: "nested_vector",
18+
_source: false,
19+
fields: ["nested_field.paragraph_id"],
20+
},
21+
query: {
22+
knn: {
23+
field: "nested_field.nested_vector",
24+
query_vector: [1, 0, 0.5],
25+
k: 10,
26+
},
27+
},
28+
},
29+
},
30+
},
31+
},
32+
{
33+
standard: {
34+
query: {
35+
term: {
36+
topic: "ai",
37+
},
38+
},
39+
},
40+
},
41+
],
42+
rank_window_size: 10,
43+
rank_constant: 1,
44+
},
45+
},
46+
_source: ["topic"],
47+
});
48+
console.log(response);
49+
----
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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: "retrievers_example",
8+
retriever: {
9+
rrf: {
10+
retrievers: [
11+
{
12+
standard: {
13+
query: {
14+
term: {
15+
topic: "elastic",
16+
},
17+
},
18+
},
19+
},
20+
{
21+
rrf: {
22+
retrievers: [
23+
{
24+
standard: {
25+
query: {
26+
query_string: {
27+
query:
28+
"(information retrieval) OR (artificial intelligence)",
29+
default_field: "text",
30+
},
31+
},
32+
},
33+
},
34+
{
35+
knn: {
36+
field: "vector",
37+
query_vector: [0.23, 0.67, 0.89],
38+
k: 3,
39+
num_candidates: 5,
40+
},
41+
},
42+
],
43+
rank_window_size: 10,
44+
rank_constant: 1,
45+
},
46+
},
47+
],
48+
rank_window_size: 10,
49+
rank_constant: 1,
50+
},
51+
},
52+
_source: false,
53+
size: 1,
54+
explain: true,
55+
});
56+
console.log(response);
57+
----

docs/doc_examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc renamed to docs/doc_examples/17b1647c8509543f2388c886f2584a20.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const response = await client.search({
1616
},
1717
},
1818
field: "text",
19-
inference_id: "my-cohere-rerank-model",
19+
inference_id: "elastic-rerank",
2020
inference_text: "How often does the moon hide the sun?",
2121
rank_window_size: 100,
2222
min_score: 0.5,

docs/doc_examples/4dab4c5168047ba596af1beb0e55b845.asciidoc renamed to docs/doc_examples/22b176a184517cf1b5801f5eb4f17f97.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
[source, js]
55
----
6-
const response = await client.cluster.getSettings({
7-
flat_settings: "true",
6+
const response = await client.indices.rollover({
7+
alias: "datastream",
88
});
99
console.log(response);
1010
----

docs/doc_examples/2577acb462b95bd4394523cf2f8a661f.asciidoc

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/doc_examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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-elastic-rerank",
9+
inference_config: {
10+
service: "elasticsearch",
11+
service_settings: {
12+
model_id: ".rerank-v1",
13+
num_threads: 1,
14+
adaptive_allocations: {
15+
enabled: true,
16+
min_number_of_allocations: 1,
17+
max_number_of_allocations: 4,
18+
},
19+
},
20+
},
21+
});
22+
console.log(response);
23+
----

docs/doc_examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc renamed to docs/doc_examples/4edfb5934d14ad7655bd7e19a112b5c0.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ const response = await client.search({
88
query: {
99
bool: {
1010
must: [
11-
{
12-
term: {
13-
"category.keyword": "Main Course",
14-
},
15-
},
1611
{
1712
term: {
1813
tags: "vegetarian",
@@ -27,6 +22,11 @@ const response = await client.search({
2722
},
2823
],
2924
should: [
25+
{
26+
term: {
27+
category: "Main Course",
28+
},
29+
},
3030
{
3131
multi_match: {
3232
query: "curry spicy",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy