考虑以下映射:
onReceive
还有一些文件:
{
"distribution": {
"type": "nested",
"properties": {
"probability": {
"type": "float"
},
"value": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
我希望根据概率阈值获得类似于指定聚合{
"distribution": [
{"probability": 0.7, "value": "foo"},
{"probability": 0.3, "value": "bar"}
]
}
{
"distribution": [
{"probability": 0.6, "value": "baz"},
{"probability": 0.4, "value": "qux"}
]
}
{
"distribution": [
{"probability": 0.6, "value": "foo"},
{"probability": 0.3, "value": "baz"}
]
}
选项的结果:
missing
字段。 E.g。对于0.2的概率阈值,您将得到2个桶,value
和foo
。对于0.65的阈值,您还可以获得2个桶baz
,最后2个文档分组为foo
。
我现在真的用完了想法,所以任何帮助都将不胜感激!