是的,从ES
1.6开始,您可以使用响应过滤,并且
filter_path在查询中使用参数仅枚举响应中所需的内容:
curl -XGET 'localhost:9200/foo_bar/foo/_search?pretty&filter_path=hits.total,hits.max_score,hits.hits._id,hits.hits._source'

是的,从ES
1.6开始,您可以使用响应过滤,并且
filter_path在查询中使用参数仅枚举响应中所需的内容:
curl -XGET 'localhost:9200/foo_bar/foo/_search?pretty&filter_path=hits.total,hits.max_score,hits.hits._id,hits.hits._source'