27 lines
552 B
Plaintext
27 lines
552 B
Plaintext
// 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-rank-vectors-float",
|
|
query: {
|
|
script_score: {
|
|
query: {
|
|
match_all: {},
|
|
},
|
|
script: {
|
|
source: "maxSimDotProduct(params.query_vector, 'my_vector')",
|
|
params: {
|
|
query_vector: [
|
|
[0.5, 10, 6],
|
|
[-0.5, 10, 10],
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
console.log(response);
|
|
----
|