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

62 lines
1.2 KiB
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: {
match: {
comment: {
query: "foo bar",
},
},
},
rescore: {
window_size: 50,
query: {
rescore_query: {
match_phrase: {
comment: {
query: "foo bar",
slop: 1,
},
},
},
rescore_query_weight: 10,
},
},
_source: false,
highlight: {
order: "score",
fields: {
comment: {
fragment_size: 150,
number_of_fragments: 3,
highlight_query: {
bool: {
must: {
match: {
comment: {
query: "foo bar",
},
},
},
should: {
match_phrase: {
comment: {
query: "foo bar",
slop: 1,
boost: 10,
},
},
},
minimum_should_match: 0,
},
},
},
},
},
});
console.log(response);
----