Skip to content

Commit 3d3c72d

Browse files
Auto-generated API code (#2587)
1 parent 3627a4c commit 3d3c72d

6 files changed

+226
-479
lines changed
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.indices.create({
7+
index: "test-index",
8+
mappings: {
9+
properties: {
10+
source_field: {
11+
type: "text",
12+
fields: {
13+
infer_field: {
14+
type: "semantic_text",
15+
inference_id: ".elser-2-elasticsearch",
16+
},
17+
},
18+
},
19+
},
20+
},
21+
});
22+
console.log(response);
23+
----

docs/doc_examples/38ba93890494bfa7beece58dffa44f98.asciidoc

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

docs/doc_examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc renamed to docs/doc_examples/681d24c2633f598fc43d6afff8996dbb.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@
55
----
66
const response = await client.indices.create({
77
index: "retrievers_example",
8+
settings: {
9+
number_of_shards: 1,
10+
},
811
mappings: {
912
properties: {
1013
vector: {
1114
type: "dense_vector",
1215
dims: 3,
1316
similarity: "l2_norm",
1417
index: true,
18+
index_options: {
19+
type: "flat",
20+
},
1521
},
1622
text: {
1723
type: "text",

docs/doc_examples/93c77c65f1e11382f8043d0300e87b89.asciidoc renamed to docs/doc_examples/7bdc283b96c7a965fae23013647b8578.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ const response = await client.indices.create({
77
index: "test-index",
88
mappings: {
99
properties: {
10-
infer_field: {
11-
type: "semantic_text",
12-
inference_id: ".elser-2-elasticsearch",
13-
},
1410
source_field: {
1511
type: "text",
1612
copy_to: "infer_field",
1713
},
14+
infer_field: {
15+
type: "semantic_text",
16+
inference_id: ".elser-2-elasticsearch",
17+
},
1818
},
1919
},
2020
});

docs/doc_examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc renamed to docs/doc_examples/948418e0ef1b7e7cfee2f11be715d7d2.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
----
66
const response = await client.indices.create({
77
index: "retrievers_example_nested",
8+
settings: {
9+
number_of_shards: 1,
10+
},
811
mappings: {
912
properties: {
1013
nested_field: {
@@ -18,6 +21,9 @@ const response = await client.indices.create({
1821
dims: 3,
1922
similarity: "l2_norm",
2023
index: true,
24+
index_options: {
25+
type: "flat",
26+
},
2127
},
2228
},
2329
},

0 commit comments

Comments
 (0)