Files
elasticsearch-js/docs/doc_examples/edcfadbfb14d97a2f5e6e21ef7039818.asciidoc
2024-07-29 17:10:05 -05:00

41 lines
752 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({
query: {
function_score: {
query: {
match_all: {},
},
boost: "5",
functions: [
{
filter: {
match: {
test: "bar",
},
},
random_score: {},
weight: 23,
},
{
filter: {
match: {
test: "cat",
},
},
weight: 42,
},
],
max_boost: 42,
score_mode: "max",
boost_mode: "multiply",
min_score: 42,
},
},
});
console.log(response);
----