Skip to content

Commit 5520a9f

Browse files
Auto-generated API code
1 parent f72f9e9 commit 5520a9f

File tree

148 files changed

+1817
-705
lines changed

Some content is hidden

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

148 files changed

+1817
-705
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);

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: 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+
----

docs/doc_examples/d1a285aa244ec461d68f13e7078a33c0.asciidoc renamed to docs/doc_examples/3ab8f65fcb55a0e3664c55749ec41efd.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const response = await client.indices.create({
2929
"arabic_normalization",
3030
"persian_normalization",
3131
"persian_stop",
32+
"persian_stem",
3233
],
3334
},
3435
},
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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: "amazon-reviews",
8+
id: 1,
9+
document: {
10+
review_text:
11+
"This product is lifechanging! I'm telling all my friends about it.",
12+
review_vector: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8],
13+
},
14+
});
15+
console.log(response);
16+
----

0 commit comments

Comments
 (0)