Skip to content

Commit edfef68

Browse files
authoredDec 10, 2024··
Auto-generated code for 8.16 (#2538)
1 parent e27e096 commit edfef68

28 files changed

+249
-154
lines changed
 

‎docs/doc_examples/160986f49758f4e8345d183a842f6351.asciidoc ‎docs/doc_examples/0c52af573c9401a2a687e86a4beb182b.asciidoc

+1-1
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
],
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/9f16fca9813304e398ee052aa857dbcd.asciidoc ‎docs/doc_examples/48e142e6c69014e0509d4c9251749d77.asciidoc

+2-1
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

-17
This file was deleted.
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.ingest.simulate({
7+
id: "query_helper_pipeline",
8+
docs: [
9+
{
10+
_source: {
11+
content:
12+
"artificial intelligence in medicine articles published in the last 12 months",
13+
},
14+
},
15+
],
16+
});
17+
console.log(response);
18+
----

‎docs/doc_examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc

-22
This file was deleted.

‎docs/doc_examples/f4d0ef2e0f76babee83d999fe35127f2.asciidoc ‎docs/doc_examples/80135e8c644e34cc70ce8a4e7915d1a2.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const response = await client.ingest.putPipeline({
1212
field: "data",
1313
indexed_chars: 11,
1414
indexed_chars_field: "max_size",
15-
remove_binary: false,
15+
remove_binary: true,
1616
},
1717
},
1818
],

‎docs/doc_examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc

-22
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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: "query_helper_pipeline",
8+
processors: [
9+
{
10+
script: {
11+
source:
12+
"ctx.prompt = 'Please generate an elasticsearch search query on index `articles_index` for the following natural language query. Dates are in the field `@timestamp`, document types are in the field `type` (options are `news`, `publication`), categories in the field `category` and can be multiple (options are `medicine`, `pharmaceuticals`, `technology`), and document names are in the field `title` which should use a fuzzy match. Ignore fields which cannot be determined from the natural language query context: ' + ctx.content",
13+
},
14+
},
15+
{
16+
inference: {
17+
model_id: "openai_chat_completions",
18+
input_output: {
19+
input_field: "prompt",
20+
output_field: "query",
21+
},
22+
},
23+
},
24+
{
25+
remove: {
26+
field: "prompt",
27+
},
28+
},
29+
],
30+
});
31+
console.log(response);
32+
----

‎docs/doc_examples/8593715fcc70315a0816b435551258e0.asciidoc ‎docs/doc_examples/93c77c65f1e11382f8043d0300e87b89.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const response = await client.indices.create({
99
properties: {
1010
infer_field: {
1111
type: "semantic_text",
12-
inference_id: "my-elser-endpoint",
12+
inference_id: ".elser-2-elasticsearch",
1313
},
1414
source_field: {
1515
type: "text",

‎docs/doc_examples/b26b5574438e4eaf146b2428bf537c51.asciidoc ‎docs/doc_examples/cecfaa659af6646b3b67d7b311586fa0.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const response = await client.ingest.putPipeline({
1414
attachment: {
1515
target_field: "_ingest._value.attachment",
1616
field: "_ingest._value.data",
17-
remove_binary: false,
17+
remove_binary: true,
1818
},
1919
},
2020
},
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.indices.create({
7+
index: "test-index",
8+
query: {
9+
semantic: {
10+
field: "my_semantic_field",
11+
},
12+
},
13+
highlight: {
14+
fields: {
15+
my_semantic_field: {
16+
type: "semantic",
17+
number_of_fragments: 2,
18+
order: "score",
19+
},
20+
},
21+
},
22+
});
23+
console.log(response);
24+
----

‎docs/doc_examples/35fd9549350926f8d57dc1765e2f40d3.asciidoc ‎docs/doc_examples/d5242b1ab0213f25e5e0742032274ce6.asciidoc

+1-1
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/5ba32ebaa7ee28a339c7693696d305ca.asciidoc ‎docs/doc_examples/e77c2f41a7eca765b0c5f734a66d919f.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const response = await client.ingest.putPipeline({
1111
attachment: {
1212
field: "data",
1313
properties: ["content", "title"],
14-
remove_binary: false,
14+
remove_binary: true,
1515
},
1616
},
1717
],

‎docs/doc_examples/bb5a1319c496acc862c670cc7224e59a.asciidoc ‎docs/doc_examples/ea8c4229afa6dd4f1321355542be9912.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const response = await client.ingest.putPipeline({
1212
field: "data",
1313
indexed_chars: 11,
1414
indexed_chars_field: "max_size",
15-
remove_binary: false,
15+
remove_binary: true,
1616
},
1717
},
1818
],

0 commit comments

Comments
 (0)
Please sign in to comment.