My document mapping has a date property in the strict_date_time_no_millis format.
However, when doing an aggregation based on this property, it also uses the hours. Is it possible to perform the aggregation using only the date and ignoring the hours?
Another issue is that the field I use for aggregation is a string to store the evaluation of a sale. Ex .: G-Good, B-Bad, N-Neutral.
Is it possible to convert these letters to make an average? Ex .: G = 2, N = 1, B-0
{
"size": 0,
"_source": false,
"stored_fields": "_none_",
"aggregations": {
"groupby": {
"composite": {
"size": 1000,
"sources": [
{
"1728": {
"terms": {
"field": "sale_date",
"missing_bucket": true,
"order": "asc"
}
}
}
]
},
"aggregations": {
"1790": {
"avg": {
"field": "Converted_Rating_Field"
}
}
}
}
}
}