Auto-generated code for 8.x (#2412)
Co-authored-by: Josh Mock <joshua.mock@elastic.co>
This commit is contained in:
28
docs/doc_examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc
Normal file
28
docs/doc_examples/dcf82f3aacae49c0bb4ccbc673f13e9f.asciidoc
Normal file
@ -0,0 +1,28 @@
|
||||
// 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: "my-index",
|
||||
size: 10,
|
||||
query: {
|
||||
script_score: {
|
||||
query: {
|
||||
knn: {
|
||||
query_vector: [0.04283529, 0.85670587, -0.51402352, 0],
|
||||
field: "my_int4_vector",
|
||||
num_candidates: 20,
|
||||
},
|
||||
},
|
||||
script: {
|
||||
source: "(dotProduct(params.queryVector, 'my_int4_vector') + 1.0)",
|
||||
params: {
|
||||
queryVector: [0.04283529, 0.85670587, -0.51402352, 0],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
Reference in New Issue
Block a user