elasticsearch 查询所有文档

0.添加一个索引

curl -i -XPUT http://172.31.250.16:10004/test_index/user/1 -d '{
    "name": "小明",
    "email": "[email protected]",
    "tags": ["like","walk","football"]
}'

 

1.查询所有索引

curl -XGET http://172.31.250.16:10004/_cat/indices\?v

 

2.查询所有文档

curl -i -XGET http://192.168.11.119:9200/test_index/user/_search\?pretty -d '
{
  "query": {
                "match_all": {
                }
  }
}

 

参考:https://www.codercto.com/a/66299.html

posted @ 2019-08-06 11:59  littlevigra  阅读(15511)  评论(0编辑  收藏  举报