Added/updated snippets for docs (#2318)
This commit is contained in:
32
docs/doc_examples/65c671fbecdb5b0d75c13d63f87e36f0.asciidoc
Normal file
32
docs/doc_examples/65c671fbecdb5b0d75c13d63f87e36f0.asciidoc
Normal file
@ -0,0 +1,32 @@
|
||||
// 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: "museums",
|
||||
size: 0,
|
||||
aggs: {
|
||||
rings_around_amsterdam: {
|
||||
geo_distance: {
|
||||
field: "location",
|
||||
origin: "POINT (4.894 52.3760)",
|
||||
ranges: [
|
||||
{
|
||||
to: 100000,
|
||||
},
|
||||
{
|
||||
from: 100000,
|
||||
to: 300000,
|
||||
},
|
||||
{
|
||||
from: 300000,
|
||||
},
|
||||
],
|
||||
keyed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
Reference in New Issue
Block a user