Reviewing your code, you have made a small mistake.

In the while loop, do not use currentScanSearchResp.getScrollId()

https://gist.github.com/mox601/545c7176785ef209f7f3#file-scroll-search-java-L59

This can get outdated in the while loop.

Instead, use searchResponse.getScrollId()

Background info: the scroll ID changes from response to response!

Jörg



On Mon, Apr 28, 2014 at 12:44 PM, Matteo Moci <[email protected]> wrote:

> Hi Jorg,
> Investigating on what call the exception relates to,
> I ran the search on 2 types, and I'll show you the merged logs of my
> client and the one printed on the node:
>
> [2014-04-28 12:09:07,*438*][DEBUG][action.search.type       ]
> [moxbook-pro] [2] Failed to execute query phase
> 2014-04-28 12:09:07,*442*/CEST [main] INFO finished scrolling, hits
> length <=0
> [2014-04-28 12:09:07,*455*][DEBUG][action.search.type       ]
> [moxbook-pro] [3] Failed to execute query phase
> 2014-04-28 12:09:07,*456*/CEST [main] INFO finished scrolling, hits
> length <=0
>
> The client logs are printed by the client code (running on the same
> machine),
> once per type, after exiting the while (hits.length > 0) scroll's cycle
> and
> before calling the clear scroll at the end.
>
> So to wrap up, according to what I see, the error message
> of the failing execute query phase happens before the clear scroll.
>
> Following another path and reading your first email,
> I added to the configuration file elasticsearch.yml the line:
>
> search.keep_alive_interval: 1H
> hoping to set the search keep alive explicitly on the node.
>
> Starting the node like this:
> $ ./elasticsearch -f -Des.logger.level=DEBUG
> gives this log [1], but can't find mention of the keep alive interval I
> set up.
>
> Is it the right parameter name, and should it help?
>
> Thanks,
> Matteo
>
> [1] https://gist.github.com/mox601/11368114
>
>
>
> On Mon, Apr 28, 2014 at 11:53 AM, [email protected] <
> [email protected]> wrote:
>
>> OK, the "new Scroll(...)" should'nt make any difference....
>>
>> Maybe the cause for theerror message is the clear scroll call at the end?
>> If so, it shouldn't be serious.
>>
>> Jörg
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUec-BG2%2BJz9VOjXMjjwEeqxqMyA2XNusWCmMBKt0f8w%40mail.gmail.com<https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUec-BG2%2BJz9VOjXMjjwEeqxqMyA2XNusWCmMBKt0f8w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Matteo Moci
> http://mox.fm
>
>  --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAONgFZ5gcpx2nXUZ31qHWrLb_LB8vpXPCJsmUH9-HAMF34HDmw%40mail.gmail.com<https://groups.google.com/d/msgid/elasticsearch/CAONgFZ5gcpx2nXUZ31qHWrLb_LB8vpXPCJsmUH9-HAMF34HDmw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH1pfcM3UgBmNe9Yq%2BS9S%3DOY7eo_P1urGs5Kj2wORv%2BWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to