Negative number aggregation is returning the wrong results. is there any indexing or searching property needs to be applied for this.
Here is the sample data.
TOT_TRAN ACID
2000 0G50044716
-100 0G50044716
118839 1G60044718
-10000 0G50044716
-80000 0G50044716
214350 0G50044717
-199912 0G50044716
57770 0G50044717
-10 0G50044716
-255 0G50044716
-15000 0G50044716
-61564 0G50044716
62094 0G50044716
-10000 0G50044718
-33165 0G50044716
20000 0G50044717
-29881 0G50044718
100000 0G50044716
-12500 0G50044716
-38261 0G50044716
-10200 0G50044716
37725 0G50044716
-3500 0G50044716
sample query is
{
"from": 0,
"size": 0,
"_source": {
"includes": [
"SUM"
],
"excludes": []
},
"aggregations": {
"bank_ACID": {
"terms": {
"field": "ACID",
"size": 10,
"order": {
"sumValue": "asc"
}
},
"aggregations": {
"sumValue": {
"sum": {
"field": "TOT_TRAN"
}
}
}
}
}
}
if I say aggregation size as 10 it will return completely wrong results, if I increase the aggregation size 1000 something like that it will return correct results for limited number records.
checked version : 2.2 and 2.3 elasticsearch
Is there any way I can get the solution for this?
Thank You In advance.