Efficient way to retrieve all _ids in ElasticSearch

后端 未结 11 2016
轮回少年
轮回少年 2021-01-31 01:31

What is the fastest way to get all _ids of a certain index from ElasticSearch? Is it possible by using a simple query? One of my index has around 20,000 documents.

11条回答
  •  眼角桃花
    2021-01-31 01:46

    Another option

    curl 'http://localhost:9200/index/type/_search?pretty=true&fields='
    

    will return _index, _type, _id and _score.

提交回复
热议问题