'Elasticsearch duplicate by date timestamp
I make a query to a server in which it has duplicate data by date. I know that the base would have to be debugged, but how could I do a query like the following and return a single record per date. I clarify the dates are duplicated:
{
"query":{"bool":{
"must":[
{"range":{"@timestamp":{"lte": "2021-09-21T23:10:00.000-03:00","gte": "2021-09-21T23:10:00.000-03:00"}}},
{"match":{"type.keyword":el_type}}
]
}},
"size":1000,
"sort": [{"@timestamp": {"order": "asc"}}],
"_source":{"includes":["@timestamp",el_var]}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|