Added new docs examples (#1149)
* Updated enabled files list * Added new docs examples
This commit is contained in:
committed by
GitHub
parent
7717799ca6
commit
0e659031e3
64
docs/doc_examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc
Normal file
64
docs/doc_examples/22334f4b24bb8977d3e1bf2ffdc29d3f.asciidoc
Normal file
@ -0,0 +1,64 @@
|
||||
// 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({
|
||||
body: {
|
||||
query: {
|
||||
nested: {
|
||||
path: 'parent',
|
||||
query: {
|
||||
bool: {
|
||||
must: {
|
||||
range: {
|
||||
'parent.age': {
|
||||
gte: 21
|
||||
}
|
||||
}
|
||||
},
|
||||
filter: {
|
||||
nested: {
|
||||
path: 'parent.child',
|
||||
query: {
|
||||
match: {
|
||||
'parent.child.name': 'matt'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
sort: [
|
||||
{
|
||||
'parent.child.age': {
|
||||
mode: 'min',
|
||||
order: 'asc',
|
||||
nested: {
|
||||
path: 'parent',
|
||||
filter: {
|
||||
range: {
|
||||
'parent.age': {
|
||||
gte: 21
|
||||
}
|
||||
}
|
||||
},
|
||||
nested: {
|
||||
path: 'parent.child',
|
||||
filter: {
|
||||
match: {
|
||||
'parent.child.name': 'matt'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user