我想從索引獲取所有數據。由於項目的數量是足夠大的內存我使用Scroll(好的功能):ElasticSearch多個滾動Java API
client.prepareSearch(index)
.setTypes(myType).setSearchType(SearchType.SCAN)
.setScroll(new TimeValue(60000))
.setSize(amountPerCall)
.setQuery(MatchAll())
.execute().actionGet();
打電話時哪些工作良好:
client.prepareSearchScroll(scrollId)
.setScroll(new TimeValue(600000))
.execute().actionGet()
但是,當我打電話前一種方法多次,我多次獲得相同的scrollId
,因此我無法多次滾動 - 並行。
我發現http://elasticsearch-users.115913.n3.nabble.com/Multiple-scrolls-simultanious-td4024191.html其中說,這是可能的 - 雖然我不知道他與ES的隸屬關係。
我做錯了什麼?
HTTP的相關問題: //stackoverflow.com/questions/25453872/why-does-this-elasticsearch-scan-and-scroll-keep-returning-the-same-scroll-id – Danielson