更新时间:2023-02-19 07:57:40
是的,从 ES 1.6 开始,您可以使用 响应过滤 并在查询中使用 filter_path
参数仅枚举响应中所需的内容:
Yes, as of ES 1.6, you can use response filtering and using the filter_path
parameter in the query enumerate only what you need in the response:
curl -XGET 'localhost:9200/foo_bar/foo/_search?pretty&filter_path=hits.total,hits.max_score,hits.hits._id,hits.hits._source'