Hi I'm trying to execute an date_histogram
aggregation on a index with date_range
field where some of documents can have open end (no value for lt
or lte
of that date_rage
).
here's my setup:
index:
PUT /events
{
"mappings": {
"dynamic": "false",
"properties": {
"dateRange": {
"type": "date_range"
}
}
}
}
doc:
PUT /events/_doc/1
{
"dateRange": {
"gte": "2020-02-20"
},
}
query:
POST /events/_search?pretty=true&error_trace=true
{
"aggs": {
"events-histogram": {
"date_histogram": {
"field": "dateRange",
"calendar_interval": "day"
}
}
},
"size": 0
}
unfortunately even if there's only one such document above query results in following exception:
CircuitBreakingException[[request] Data too large, data for [<reused_arrays>] would be [805344256/768mb], which is larger than the limit of [633785548/604.4mb]]
I've tried to use scripts to workaround that but doc['dateRange'].value
returns some obscure (i.e. "\u0001©p_䠀?\uDFBF\uDFFF\uDFBF\uDFC0"
) java.lang.String
value and I'm a bit confused. Also, missing
option which can be used with regular date
fields doesn't work here. I'm rookie ES user, so I might be missing something.