Auto-generated code for 8.15 (#2501)

This commit is contained in:
Elastic Machine
2024-12-02 18:07:32 +00:00
committed by GitHub
parent 7d4ae5e3dd
commit c69fbac3ab
60 changed files with 1007 additions and 106 deletions

View File

@ -0,0 +1,45 @@
// 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.search({
index: "retrievers_example",
retriever: {
rrf: {
retrievers: [
{
standard: {
query: {
query_string: {
query: "(information retrieval) OR (artificial intelligence)",
default_field: "text",
},
},
},
},
{
knn: {
field: "vector",
query_vector: [0.23, 0.67, 0.89],
k: 3,
num_candidates: 5,
},
},
],
rank_window_size: 10,
rank_constant: 1,
},
},
highlight: {
fields: {
text: {
fragment_size: 150,
number_of_fragments: 3,
},
},
},
_source: false,
});
console.log(response);
----