Efficient way to retrieve all _ids in ElasticSearch

后端 未结 11 1915
轮回少年
轮回少年 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 02:04

    Url -> http://localhost:9200///_query
    http method -> GET
    Query -> {"query": {"match_all": {}}, "size": 30000, "fields": ["_id"]}
    

提交回复
热议问题