`{
query: {
bool: {
must: [
{
query_string: {
query: "_index : (*)",
analyze_wildcard: true,
default_field: "*",
allow_leading_wildcard: true,
default_operator: "AND",
},
},
],
filter: [
{
range: {
"@timestamp": {
gte: "2024-03-31T18:30:00.000Z",
lte: "2024-04-11T18:29:00.000Z",
},
},`your text`
},
],
},
},
size: 0,
from: 0,
sort: [{ "@timestamp": { order: "desc" } }],
aggs: {
"@timestamp": {
auto_date_histogram: { field: "@timestamp", buckets: 100 },
aggs: {},
},
},
}`
this is the ES query that i am using with nodejs, i am getting result which is exceeding the time range that i gave in the query..
how can we solve this issue, or else this is the behaviour of auto_date_histogram in ES as ES deciding interval and bucket size in auto_date_histogram query
i wanted to get the result in the specified time range
New contributor
Thanu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.