0
以下映射在使用另一個字段對文檔進行分組的文檔的多個級別上彙總。Elasticsearch中GroupBy聚合的多個範圍的總和
映射:
{
'predictions': {
'properties': {
'Company':{'type':'string'},
'TxnsId':{'type':'string'},
'Emp':{'type':'string'},
'Amount':{'type':'float'},
'Cash/online':{'type':'string'},
'items':{'type':'float'},
'timestamp':{'type':'date'}
}
}
}
我的要求是有點複雜,我需要
- 對於下每個EMP(獲取不同的員工)
- 檢查它是否是網上或套現交易
- 按範圍類似0-10,11-20,21-30的項目....
- 總金額
最終輸出是這樣的:
>Emp-online-range-Amount
>a-online-(0-10)-1240$
>a-online-(21-30)-3543$
>b-online-(0-10)-2345$
>b-online-(11-20)-3456$
什麼是現金的'浮點值/ online'? – Val