是否有选项可以像 _shards 一样过滤掉 Elasticsearch 查询响应?
Is there an options to filter out the Elasticsearch query response like _shards?
有没有办法从 Elasticsearch query 响应中过滤掉 _shards
?
我正在寻找像 size
这样的选项,它会从 hits
中删除结果,但用于告诉 Elasticsearch 我不需要 _shards
键。
另一种方法是使用 jq
到 delete 某些键。
您可以使用filter_path
GET index84/_search?filter_path=-_shards
(注意 -
在 _shards
前面)
或者,例如,如果只需要找到的项目:
GET index84/_search?filter_path=hits.hits
有没有办法从 Elasticsearch query 响应中过滤掉 _shards
?
我正在寻找像 size
这样的选项,它会从 hits
中删除结果,但用于告诉 Elasticsearch 我不需要 _shards
键。
另一种方法是使用 jq
到 delete 某些键。
您可以使用filter_path
GET index84/_search?filter_path=-_shards
(注意 -
在 _shards
前面)
或者,例如,如果只需要找到的项目:
GET index84/_search?filter_path=hits.hits