Skip to content

Commit 7da9976

Browse files
Auto-generated code for 8.x (#2412)
Co-authored-by: Josh Mock <joshua.mock@elastic.co>
1 parent 4ca358c commit 7da9976

File tree

93 files changed

+2023
-438
lines changed

Some content is hidden

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

93 files changed

+2023
-438
lines changed

docs/doc_examples/77113c65e1755313183a8969233a5a07.asciidoc renamed to docs/doc_examples/01ae196538fac197eedbbf458a4ef31b.asciidoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
----
66
const response = await client.indices.create({
77
index: "idx",
8-
mappings: {
9-
_source: {
10-
mode: "synthetic",
8+
settings: {
9+
index: {
10+
mapping: {
11+
source: {
12+
mode: "synthetic",
13+
},
14+
},
1115
},
16+
},
17+
mappings: {
1218
properties: {
1319
kwd: {
1420
type: "keyword",

docs/doc_examples/611c1e05f4ebb48a1a8c8488238ce34d.asciidoc renamed to docs/doc_examples/0709a38613d2de90d418ce12b36af30e.asciidoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
[source, js]
55
----
6-
const response = await client.cluster.reroute({
7-
metric: "none",
8-
});
6+
const response = await client.cluster.reroute();
97
console.log(response);
108
----

docs/doc_examples/eed968e0d9fa2a4545c36a4e5f47b64b.asciidoc renamed to docs/doc_examples/0bee07a581c5776e068f6f4efad5a399.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const response = await client.esql.asyncQuery({
88
body: {
99
query:
1010
"\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
11+
include_ccs_metadata: true,
1112
},
1213
});
1314
console.log(response);
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.search({
7+
index: "cooking_blog",
8+
query: {
9+
match: {
10+
title: {
11+
query: "fluffy pancakes breakfast",
12+
minimum_should_match: 2,
13+
},
14+
},
15+
},
16+
});
17+
console.log(response);
18+
----

docs/doc_examples/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc renamed to docs/doc_examples/0d30077cd34e93377a3a86f2ebd69415.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const response = await client.connector.put({
99
name: "My Connector",
1010
description: "My Connector to sync data to Elastic index from Google Drive",
1111
service_type: "google_drive",
12-
language: "english",
12+
language: "en",
1313
});
1414
console.log(response);
1515
----
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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: "text_embedding",
8+
inference_id: "watsonx-embeddings",
9+
inference_config: {
10+
service: "watsonxai",
11+
service_settings: {
12+
api_key: "<api_key>",
13+
url: "<url>",
14+
model_id: "ibm/slate-30m-english-rtrvr",
15+
project_id: "<project_id>",
16+
api_version: "2024-03-14",
17+
},
18+
},
19+
});
20+
console.log(response);
21+
----
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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: "cooking_blog",
8+
query: {
9+
bool: {
10+
must: [
11+
{
12+
term: {
13+
"category.keyword": "Main Course",
14+
},
15+
},
16+
{
17+
term: {
18+
tags: "vegetarian",
19+
},
20+
},
21+
{
22+
range: {
23+
rating: {
24+
gte: 4.5,
25+
},
26+
},
27+
},
28+
],
29+
should: [
30+
{
31+
multi_match: {
32+
query: "curry spicy",
33+
fields: ["title^2", "description"],
34+
},
35+
},
36+
{
37+
range: {
38+
date: {
39+
gte: "now-1M/d",
40+
},
41+
},
42+
},
43+
],
44+
must_not: [
45+
{
46+
term: {
47+
"category.keyword": "Dessert",
48+
},
49+
},
50+
],
51+
},
52+
},
53+
});
54+
console.log(response);
55+
----
Lines changed: 19 additions & 0 deletions
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.index({
7+
index: "mv",
8+
refresh: "true",
9+
document: {
10+
a: [2, null, 1],
11+
},
12+
});
13+
console.log(response);
14+
15+
const response1 = await client.esql.query({
16+
query: "FROM mv | LIMIT 1",
17+
});
18+
console.log(response1);
19+
----

docs/doc_examples/983a867c90e63e070518f2f709f659ee.asciidoc renamed to docs/doc_examples/21d41e8cbd107fbdf0901f885834dafc.asciidoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
----
66
const response = await client.indices.create({
77
index: "idx",
8-
mappings: {
9-
_source: {
10-
mode: "synthetic",
8+
settings: {
9+
index: {
10+
mapping: {
11+
source: {
12+
mode: "synthetic",
13+
},
14+
},
1115
},
16+
},
17+
mappings: {
1218
properties: {
1319
card: {
1420
type: "wildcard",
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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-000001",
8+
mappings: {
9+
properties: {
10+
attributes: {
11+
type: "passthrough",
12+
priority: 10,
13+
properties: {
14+
id: {
15+
type: "keyword",
16+
},
17+
},
18+
},
19+
},
20+
},
21+
});
22+
console.log(response);
23+
24+
const response1 = await client.index({
25+
index: "my-index-000001",
26+
id: 1,
27+
document: {
28+
attributes: {
29+
id: "foo",
30+
zone: 10,
31+
},
32+
},
33+
});
34+
console.log(response1);
35+
36+
const response2 = await client.search({
37+
index: "my-index-000001",
38+
query: {
39+
bool: {
40+
must: [
41+
{
42+
match: {
43+
id: "foo",
44+
},
45+
},
46+
{
47+
match: {
48+
zone: 10,
49+
},
50+
},
51+
],
52+
},
53+
},
54+
});
55+
console.log(response2);
56+
57+
const response3 = await client.search({
58+
index: "my-index-000001",
59+
query: {
60+
bool: {
61+
must: [
62+
{
63+
match: {
64+
"attributes.id": "foo",
65+
},
66+
},
67+
{
68+
match: {
69+
"attributes.zone": 10,
70+
},
71+
},
72+
],
73+
},
74+
},
75+
});
76+
console.log(response3);
77+
----

0 commit comments

Comments
 (0)