有什么办法可以隐藏一些作为响应返回的公共字段。
例如,如果我得到如下响应:
{
"took": 74,
"timed_out": false,
"_shards": {
"total": 15,
"successful": 15,
"failed": 0
},
"hits": {
"total": 24,
"max_score": 0.15932977,
"hits": [
{
"_index": "prashant",
"_type": "session",
"_id": "LeIDrUNmSKGC5Sl9Y8O0Zw",
"_score": 0.15932977,
"fields": {
"Time": [
"2014-01-08T15:01:26"
]
}
},
{
"_index": "prashant",
"_type": "session",
"_id": "dlpQGXk_TOyfNnUEG6skeQ",
"_score": 0.14296037,
"fields": {
"Time": [
"2014-01-08T15:01:26"
]
}
}
]
}
}
现在我希望 ES 响应没有take、timed_out、_shards、total、success、failed值以及我不想要_index、_type的名称, 因为我正在执行对特定索引和类型的查询。
那么有没有办法以这种方式过滤 ES 响应?