Scrolling: number of already returned items?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Scrolling: number of already returned items?

This post has NOT been accepted by the mailing list yet.
Dear all,

I use elasticsearch in version 1.7.1 and want to use the scroll Requests in Java, by this request.

SearchResponse scrollResp = this.oaiEsClient.getOaiESClient().prepareSearch(this.oaiEsClient.getEsIndex())
                        .setScroll(new TimeValue(60000))
                .setQuery(QueryBuilders.boolQuery().must(query).must(QueryBuilders.matchPhrasePrefixQuery("format", "text/tg.edition+tg.aggregation+xml")))
Everything is fine. I take the Base64 encoded scrollID and take if for the next request (which is also a new instance of the Java-Class):

scrollResp = this.oaiEsClient.getOaiESClient().prepareSearchScroll(resumptionToken).setScroll(new TimeValue(600000)).execute().actionGet();

My question is, if there is any possibility to get the already returned items for a specific ScrollID.