Added/updated snippets for docs (#2318)
This commit is contained in:
34
docs/doc_examples/5969c446688c8b326acc80276573e9d2.asciidoc
Normal file
34
docs/doc_examples/5969c446688c8b326acc80276573e9d2.asciidoc
Normal file
@ -0,0 +1,34 @@
|
||||
// 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: {
|
||||
"user.id": "kimchy",
|
||||
},
|
||||
},
|
||||
highlight: {
|
||||
number_of_fragments: 3,
|
||||
fragment_size: 150,
|
||||
fields: {
|
||||
body: {
|
||||
pre_tags: ["<em>"],
|
||||
post_tags: ["</em>"],
|
||||
},
|
||||
"blog.title": {
|
||||
number_of_fragments: 0,
|
||||
},
|
||||
"blog.author": {
|
||||
number_of_fragments: 0,
|
||||
},
|
||||
"blog.comment": {
|
||||
number_of_fragments: 5,
|
||||
order: "score",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
Reference in New Issue
Block a user