假设 es 中有下面格式的数据:
{
"sid": "11232",
"100302": {
"date": "2016-09-21",
"source": 3002,
"prob": 0.618
},
"100301": {
"date": "2016-09-21",
"source": 3002,
"prob": 0.903
},
......
}
{
"sid": "21232",
"100302": {
"date": "2016-09-21",
"source": 3002,
"prob": 0.64
},
......
}
能不能返回结果类似下面的结果(节省网络占用):
[
{
"sid":"11232",
"_source":["100301","100302",...]
},
{
"sid":"21232",
"_source":["100302",...]
},
]
google 完全不知道搜什么关键字了~~~没找到合适的答案
1
ayang23 2017-03-07 11:09:00 +08:00
|
2
easyzhao 2017-03-07 11:09:56 +08:00
可以在 elasticsearch 前面加一层应用,然后按需格式化一下 数据再返回吗?
|