Skip to content

Commit b95aa98

Browse files
Auto-generated code for main (#2551)
1 parent 0ee486b commit b95aa98

File tree

66 files changed

+2459
-651
lines changed

Some content is hidden

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

66 files changed

+2459
-651
lines changed

docs/doc_examples/e20037f66bf54bcac7d10f536f031f34.asciidoc renamed to docs/doc_examples/0722b302b2b3275a988d858044f99d5d.asciidoc

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

44
[source, js]
55
----
6-
const response = await client.indices.putSettings({
7-
index: "my-index-000001",
8-
settings: {
9-
"index.blocks.read_only_allow_delete": null,
10-
},
6+
const response = await client.indices.getMapping({
7+
index: "kibana_sample_data_ecommerce",
118
});
129
console.log(response);
1310
----

docs/doc_examples/844928da2ff9a1394af5347a5e2e4f78.asciidoc renamed to docs/doc_examples/074e4602d1ca54412380a40867d078bc.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const response = await client.indices.putSettings({
1111
"index.indexing.slowlog.threshold.index.debug": "2s",
1212
"index.indexing.slowlog.threshold.index.trace": "500ms",
1313
"index.indexing.slowlog.source": "1000",
14+
"index.indexing.slowlog.reformat": true,
15+
"index.indexing.slowlog.include.user": true,
1416
},
1517
});
1618
console.log(response);
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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-rank-vectors-bit",
8+
mappings: {
9+
properties: {
10+
my_vector: {
11+
type: "rank_vectors",
12+
element_type: "bit",
13+
},
14+
},
15+
},
16+
});
17+
console.log(response);
18+
19+
const response1 = await client.bulk({
20+
index: "my-rank-vectors-bit",
21+
refresh: "true",
22+
operations: [
23+
{
24+
index: {
25+
_id: "1",
26+
},
27+
},
28+
{
29+
my_vector: [127, -127, 0, 1, 42],
30+
},
31+
{
32+
index: {
33+
_id: "2",
34+
},
35+
},
36+
{
37+
my_vector: "8100012a7f",
38+
},
39+
],
40+
});
41+
console.log(response1);
42+
----

docs/doc_examples/160986f49758f4e8345d183a842f6351.asciidoc renamed to docs/doc_examples/0c52af573c9401a2a687e86a4beb182b.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const response = await client.ingest.putPipeline({
1010
{
1111
attachment: {
1212
field: "data",
13-
remove_binary: false,
13+
remove_binary: true,
1414
},
1515
},
1616
],

docs/doc_examples/0e83f140237d75469a428ff403564bb5.asciidoc

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

docs/doc_examples/1420a22aa817c7a996baaed0ad366d6f.asciidoc

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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-rank-vectors-bit",
8+
mappings: {
9+
properties: {
10+
my_vector: {
11+
type: "rank_vectors",
12+
element_type: "bit",
13+
},
14+
},
15+
},
16+
});
17+
console.log(response);
18+
19+
const response1 = await client.bulk({
20+
index: "my-rank-vectors-bit",
21+
refresh: "true",
22+
operations: [
23+
{
24+
index: {
25+
_id: "1",
26+
},
27+
},
28+
{
29+
my_vector: [127, -127, 0, 1, 42],
30+
},
31+
{
32+
index: {
33+
_id: "2",
34+
},
35+
},
36+
{
37+
my_vector: "8100012a7f",
38+
},
39+
],
40+
});
41+
console.log(response1);
42+
43+
const response2 = await client.search({
44+
index: "my-rank-vectors-bit",
45+
query: {
46+
script_score: {
47+
query: {
48+
match_all: {},
49+
},
50+
script: {
51+
source: "maxSimDotProduct(params.query_vector, 'my_vector')",
52+
params: {
53+
query_vector: [
54+
[
55+
0.35, 0.77, 0.95, 0.15, 0.11, 0.08, 0.58, 0.06, 0.44, 0.52, 0.21,
56+
0.62, 0.65, 0.16, 0.64, 0.39, 0.93, 0.06, 0.93, 0.31, 0.92, 0,
57+
0.66, 0.86, 0.92, 0.03, 0.81, 0.31, 0.2, 0.92, 0.95, 0.64, 0.19,
58+
0.26, 0.77, 0.64, 0.78, 0.32, 0.97, 0.84,
59+
],
60+
],
61+
},
62+
},
63+
},
64+
},
65+
});
66+
console.log(response2);
67+
----
Lines changed: 26 additions & 0 deletions
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: "my-rank-vectors-float",
8+
query: {
9+
script_score: {
10+
query: {
11+
match_all: {},
12+
},
13+
script: {
14+
source: "maxSimDotProduct(params.query_vector, 'my_vector')",
15+
params: {
16+
query_vector: [
17+
[0.5, 10, 6],
18+
[-0.5, 10, 10],
19+
],
20+
},
21+
},
22+
},
23+
},
24+
});
25+
console.log(response);
26+
----
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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.ingest.putPipeline({
7+
id: "attachment",
8+
description: "Extract attachment information including original binary",
9+
processors: [
10+
{
11+
attachment: {
12+
field: "data",
13+
remove_binary: false,
14+
},
15+
},
16+
],
17+
});
18+
console.log(response);
19+
20+
const response1 = await client.index({
21+
index: "my-index-000001",
22+
id: "my_id",
23+
pipeline: "attachment",
24+
document: {
25+
data: "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",
26+
},
27+
});
28+
console.log(response1);
29+
30+
const response2 = await client.get({
31+
index: "my-index-000001",
32+
id: "my_id",
33+
});
34+
console.log(response2);
35+
----

docs/doc_examples/23af230e824f48b9cd56a4cf973d788c.asciidoc renamed to docs/doc_examples/3312c82f81816bf76629db9582991812.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const response = await client.indices.putSettings({
1414
"index.search.slowlog.threshold.fetch.info": "800ms",
1515
"index.search.slowlog.threshold.fetch.debug": "500ms",
1616
"index.search.slowlog.threshold.fetch.trace": "200ms",
17+
"index.search.slowlog.include.user": true,
1718
},
1819
});
1920
console.log(response);
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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+
size: 10,
9+
retriever: {
10+
rescorer: {
11+
rescore: {
12+
query: {
13+
window_size: 50,
14+
rescore_query: {
15+
script_score: {
16+
script: {
17+
source:
18+
"cosineSimilarity(params.queryVector, 'product-vector_final_stage') + 1.0",
19+
params: {
20+
queryVector: [-0.5, 90, -10, 14.8, -156],
21+
},
22+
},
23+
},
24+
},
25+
},
26+
},
27+
retriever: {
28+
rrf: {
29+
rank_window_size: 100,
30+
retrievers: [
31+
{
32+
standard: {
33+
query: {
34+
sparse_vector: {
35+
field: "plot_embedding",
36+
inference_id: "my-elser-model",
37+
query: "films that explore psychological depths",
38+
},
39+
},
40+
},
41+
},
42+
{
43+
standard: {
44+
query: {
45+
multi_match: {
46+
query: "crime",
47+
fields: ["plot", "title"],
48+
},
49+
},
50+
},
51+
},
52+
{
53+
knn: {
54+
field: "vector",
55+
query_vector: [10, 22, 77],
56+
k: 10,
57+
num_candidates: 10,
58+
},
59+
},
60+
],
61+
},
62+
},
63+
},
64+
},
65+
});
66+
console.log(response);
67+
----
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.indices.updateAliases({
7+
actions: [
8+
{
9+
remove_index: {
10+
index: "my-index-2099.05.06-000001",
11+
},
12+
},
13+
],
14+
});
15+
console.log(response);
16+
----
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: "kibana_sample_data_ecommerce",
8+
size: 0,
9+
aggs: {
10+
order_stats: {
11+
stats: {
12+
field: "taxful_total_price",
13+
},
14+
},
15+
},
16+
});
17+
console.log(response);
18+
----

docs/doc_examples/9f16fca9813304e398ee052aa857dbcd.asciidoc renamed to docs/doc_examples/48e142e6c69014e0509d4c9251749d77.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const response = await client.inference.put({
1010
service: "openai",
1111
service_settings: {
1212
api_key: "<api_key>",
13-
model_id: "text-embedding-ada-002",
13+
model_id: "text-embedding-3-small",
14+
dimensions: 128,
1415
},
1516
},
1617
});

docs/doc_examples/49b31e23f8b9667b6a7b2734d55fb6ed.asciidoc

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

0 commit comments

Comments
 (0)