-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00675bf
commit 6806939
Showing
104 changed files
with
3,020 additions
and
25,641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
docs/doc_examples/2a67608dadbf220a2f040f3a79d3677d.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// This file is autogenerated, DO NOT EDIT | ||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples | ||
|
||
[source, js] | ||
---- | ||
const response = await client.ingest.putPipeline({ | ||
id: "attachment", | ||
description: "Extract attachment information including original binary", | ||
processors: [ | ||
{ | ||
attachment: { | ||
field: "data", | ||
remove_binary: false, | ||
}, | ||
}, | ||
], | ||
}); | ||
console.log(response); | ||
const response1 = await client.index({ | ||
index: "my-index-000001", | ||
id: "my_id", | ||
pipeline: "attachment", | ||
document: { | ||
data: "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=", | ||
}, | ||
}); | ||
console.log(response1); | ||
const response2 = await client.get({ | ||
index: "my-index-000001", | ||
id: "my_id", | ||
}); | ||
console.log(response2); | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
docs/doc_examples/49b31e23f8b9667b6a7b2734d55fb6ed.asciidoc
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
docs/doc_examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// This file is autogenerated, DO NOT EDIT | ||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples | ||
|
||
[source, js] | ||
---- | ||
const response = await client.ingest.simulate({ | ||
id: "query_helper_pipeline", | ||
docs: [ | ||
{ | ||
_source: { | ||
content: | ||
"artificial intelligence in medicine articles published in the last 12 months", | ||
}, | ||
}, | ||
], | ||
}); | ||
console.log(response); | ||
---- |
22 changes: 0 additions & 22 deletions
22
docs/doc_examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
docs/doc_examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
docs/doc_examples/931817b168e055ecf738785c721125dd.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// This file is autogenerated, DO NOT EDIT | ||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples | ||
|
||
[source, js] | ||
---- | ||
const response = await client.ingest.putPipeline({ | ||
id: "query_helper_pipeline", | ||
processors: [ | ||
{ | ||
script: { | ||
source: | ||
"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", | ||
}, | ||
}, | ||
{ | ||
inference: { | ||
model_id: "openai_chat_completions", | ||
input_output: { | ||
input_field: "prompt", | ||
output_field: "query", | ||
}, | ||
}, | ||
}, | ||
{ | ||
remove: { | ||
field: "prompt", | ||
}, | ||
}, | ||
], | ||
}); | ||
console.log(response); | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
docs/doc_examples/d29031409016b2b798148ef173a196ae.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// This file is autogenerated, DO NOT EDIT | ||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples | ||
|
||
[source, js] | ||
---- | ||
const response = await client.indices.create({ | ||
index: "test-index", | ||
query: { | ||
semantic: { | ||
field: "my_semantic_field", | ||
}, | ||
}, | ||
highlight: { | ||
fields: { | ||
my_semantic_field: { | ||
type: "semantic", | ||
number_of_fragments: 2, | ||
order: "score", | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.