Skip to content

Commit 6cdb087

Browse files
Auto-generated code for 8.17 (#2550)
1 parent 48f369f commit 6cdb087

File tree

90 files changed

+3023
-707
lines changed

Some content is hidden

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

90 files changed

+3023
-707
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/0bee07a581c5776e068f6f4efad5a399.asciidoc

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

44
[source, js]
55
----
6-
const response = await client.esql.asyncQuery({
7-
format: "json",
6+
const response = await client.transport.request({
7+
method: "POST",
8+
path: "/_query/async",
9+
querystring: {
10+
format: "json",
11+
},
812
body: {
913
query:
1014
"\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 ",

docs/doc_examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc

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

44
[source, js]
55
----
6-
const response = await client.searchApplication.renderQuery({
7-
name: "my-app",
6+
const response = await client.transport.request({
7+
method: "POST",
8+
path: "/_application/search_application/my-app/_render_query",
89
body: {
910
params: {
1011
query_string: "my first query",

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.

docs/doc_examples/16634cfa7916cf4e8048a1d70e6240f2.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const response = await client.searchApplication.put({
1111
script: {
1212
lang: "mustache",
1313
source:
14-
'\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n \n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "_source": {\n "includes": ["title", "plot"]\n },\n "highlight": {\n "fields": {\n "title": { "fragment_size": 0 },\n "plot": { "fragment_size": 200 }\n }\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
14+
'\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "_source": {\n "includes": ["title", "plot"]\n },\n "highlight": {\n "fields": {\n "title": { "fragment_size": 0 },\n "plot": { "fragment_size": 200 }\n }\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
1515
params: {
1616
query: "",
1717
_es_filters: {},

docs/doc_examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
[source, js]
55
----
6-
const response = await client.simulate.ingest({
6+
const response = await client.transport.request({
7+
method: "POST",
8+
path: "/_ingest/_simulate",
79
body: {
810
docs: [
911
{
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+
----

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