标签:elastic 部分 library last .com type height 技术 ati
Mget操作:
查询多个文档:
curl -XGET ‘http://192.168.1.151:9200/_mget‘ -d ‘{"docs": [{"_index": "library","_type": "books", "_id": "1"}, {"_index": "library","_type": "books", "_id": "2"}]}‘
curl -XGET ‘http://192.168.1.151:9200/library/_mget‘ -d ‘{"docs": [{"_index": "library","_type": "books", "_id": "1"}, {"_index": "library","_type": "books", "_id": "2"}]}‘
查询多个文档的部分字段:
curl -XGET ‘http://192.168.1.151:9200/library/_mget‘ -d ‘{"docs": [{"_index": "library","_type": "books", "_id": "1", "_source": ["title","price"]}]}‘
获取相同index相同type不同id的文档:
curl -XGET ‘http://192.168.1.151:9200/library/books/_mget‘ -d ‘{"docs": [{"_id": "1"}, {"_id": "2"}]}‘
curl -XGET ‘http://192.168.1.151:9200/library/books/_mget‘ -d ‘{"ids": ["1","2"]}‘
ELK 学习笔记之 elasticsearch Mget操作
标签:elastic 部分 library last .com type height 技术 ati
原文地址:http://www.cnblogs.com/AK47Sonic/p/7562513.html