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'のfloat値とは何ですか? – Val