Hello Team,
I'm currently working with rollup jobs in ES 7.16.2 and I'm looking to group on multiple date properties. It seems that this isn't currently possible with the API only supporting a single data_histogram field. It also seems that Date types aren't supported by other aggregations i.e. Histogram or Terms, with the outputted message:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Validation Failed: 1: The field referenced by a terms group must be a [numeric] or [keyword/text] type, but found [date] for field [document.date];"
}
],
"type" : "illegal_argument_exception",
"reason" : "Validation Failed: 1: The field referenced by a terms group must be a [numeric] or [keyword/text] type, but found [date] for field [document.date];"
},
"status" : 400
}
We are currently planning to work around this limitation by also indexing the date property we care about as a long so that we can roll it up. For this particular property, the value of including it is primarily for queries rather than aggregations.
I have a few questions on this topic, firstly is my assertion about there being no way to rollup multiple dates properties correct? If so, is this addition on the roadmap for the rollup feature?
Is the approach I have outlined above of indexing the value with multiple types a sensible workaround for this problem? Might there be any other options we could consider?
Thanks!