Java – elasticsearch uses the jest API to scan and scroll

I am currently working with jest:

Can I scan and scroll using this API?

http://www.elasticsearch.org/guide/reference/api/search/search-type/

I am currently using the search command:

Search search = new Search("{\"size\" : "+RESULT_SIZE+",\"query\":{\"match_all\":{}}}");

But I'm worried about the big result set If you use the search command, how do you set the "search_type = scan & scroll = 10m & size = 50" parameter?

Solution

Edit:

It seems that jest does not support "scan" search type at present: in the poor rapid turnover, jest now supports scan type search! Quick turnover of props to @ ferhat! JEST – SearchType. java

Have you considered using elasticsearch transport client? I can understand whether you prefer the jest API, but with elasticsearch (exhibit a: elasticsearch 0.90 is imaginary!) With new features, you can use them immediately when they pop up instead of waiting for jest to catch up

My $0.02

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>