How to aggregate Elasticsearch results by the timestamp on day interval?
The query also contains filtering the values of aggregation where timestamp greater than.
GET index_name/_search
{
"query": {
"bool": {
"filter": [
{
"range": {
"@timestamp": {
"gte": "2022-10-01T03:55:47.165Z"
}
}
}
]
}
},
"aggs": {
"date_interval": {
"date_histogram": {
"field": "@timestamp",
"interval": "day"
}
}
}
}
PreviousThe impact of Elasticsearch segments on search speedNextMastering Vector Search in Elasticsearch: Mapping Index for KNN
Last updated