Skip to content

Commit 0425755

Browse files
Auto-generated API code
1 parent 6fb0f42 commit 0425755

30 files changed

+1067
-223
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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.getMapping({
7+
index: "kibana_sample_data_ecommerce",
8+
});
9+
console.log(response);
10+
----

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);

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/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc renamed to docs/doc_examples/6b67c6121efb86ee100d40c2646f77b5.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
[source, js]
55
----
66
const response = await client.indices.putSettings({
7-
index: "my-index-000001",
7+
index: "*",
88
settings: {
99
"index.search.slowlog.include.user": true,
10+
"index.search.slowlog.threshold.fetch.warn": "30s",
11+
"index.search.slowlog.threshold.query.warn": "30s",
1012
},
1113
});
1214
console.log(response);

docs/doc_examples/f9ee5d55a73f4c1fe7d507609047aefd.asciidoc renamed to docs/doc_examples/6fa02c2ad485bbe91f44b321158250f3.asciidoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ const response = await client.search({
1212
fields: ["my_field", "my_field._2gram", "my_field._3gram"],
1313
},
1414
},
15+
highlight: {
16+
fields: {
17+
my_field: {
18+
matched_fields: ["my_field._index_prefix"],
19+
},
20+
},
21+
},
1522
});
1623
console.log(response);
1724
----
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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-index-000001",
8+
query: {
9+
prefix: {
10+
full_name: {
11+
value: "ki",
12+
},
13+
},
14+
},
15+
highlight: {
16+
fields: {
17+
full_name: {
18+
matched_fields: ["full_name._index_prefix"],
19+
},
20+
},
21+
},
22+
});
23+
console.log(response);
24+
----
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
daily_sales: {
11+
date_histogram: {
12+
field: "order_date",
13+
calendar_interval: "day",
14+
},
15+
aggs: {
16+
daily_revenue: {
17+
sum: {
18+
field: "taxful_total_price",
19+
},
20+
},
21+
smoothed_revenue: {
22+
moving_fn: {
23+
buckets_path: "daily_revenue",
24+
window: 3,
25+
script: "MovingFunctions.unweightedAvg(values)",
26+
},
27+
},
28+
},
29+
},
30+
},
31+
});
32+
console.log(response);
33+
----
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
daily_sales: {
11+
date_histogram: {
12+
field: "order_date",
13+
calendar_interval: "day",
14+
format: "yyyy-MM-dd",
15+
},
16+
aggs: {
17+
revenue: {
18+
sum: {
19+
field: "taxful_total_price",
20+
},
21+
},
22+
unique_customers: {
23+
cardinality: {
24+
field: "customer_id",
25+
},
26+
},
27+
avg_basket_size: {
28+
avg: {
29+
field: "total_quantity",
30+
},
31+
},
32+
},
33+
},
34+
},
35+
});
36+
console.log(response);
37+
----
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
categories: {
11+
terms: {
12+
field: "category.keyword",
13+
size: 5,
14+
order: {
15+
total_revenue: "desc",
16+
},
17+
},
18+
aggs: {
19+
total_revenue: {
20+
sum: {
21+
field: "taxful_total_price",
22+
},
23+
},
24+
avg_order_value: {
25+
avg: {
26+
field: "taxful_total_price",
27+
},
28+
},
29+
total_items: {
30+
sum: {
31+
field: "total_quantity",
32+
},
33+
},
34+
},
35+
},
36+
},
37+
});
38+
console.log(response);
39+
----
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+
avg_order_value: {
11+
avg: {
12+
field: "taxful_total_price",
13+
},
14+
},
15+
},
16+
});
17+
console.log(response);
18+
----
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.search({
7+
index: "kibana_sample_data_ecommerce",
8+
size: 0,
9+
aggs: {
10+
daily_orders: {
11+
date_histogram: {
12+
field: "order_date",
13+
calendar_interval: "day",
14+
format: "yyyy-MM-dd",
15+
min_doc_count: 0,
16+
},
17+
},
18+
},
19+
});
20+
console.log(response);
21+
----
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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.getSettings({
7+
index: "_all",
8+
expand_wildcards: "all",
9+
filter_path: "*.settings.index.*.slowlog",
10+
});
11+
console.log(response);
12+
----
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
sales_by_category: {
11+
terms: {
12+
field: "category.keyword",
13+
size: 5,
14+
order: {
15+
_count: "desc",
16+
},
17+
},
18+
},
19+
},
20+
});
21+
console.log(response);
22+
----

0 commit comments

Comments
 (0)