Scrolling using the Scala API to ES

Hi:
What is the syntax for using the scroll API for searches using the
scala interface (elastic4s) ?
I am not able to find suitable documentation for this and any help is
appreciated.

Thanks

Ramdev

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c18a9fb0-b794-41f4-89e2-b1cc0e74fd24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ok, So I figured this bit out with a few provisos........ ( there wasn't a
test that covered this case in the UnitTests)

Build the Search Requests like so :

{
search in "index/type" query
{
matchQuery("FIELD", field_value)
} scroll (KeepAlive - duration using ES duration syntax for eg: 1m -
indicating 1minute)
}.build

Once the query is built, the first query is executed like so :

client.execute(query)

The SearchResponse from the future returned, from executing the Query,
also returned a ScrollId

searchResponse.getScrollId

Subsequent Queries (to get scroll through the rest of the full results of
the query :

client.searchScroll(searchResponse.getScrollId,KeepAlive)

Keep in mind that the scrollId needs to be retrieved after each search
scroll call.

Even tho' there were two calls allowed for search scroll

client.searchScroll(scrollId) and
client.searchScroll(scrollId,KeepAlive)

Only the 2nd call actually worked in my case. the first call went thought
the first execution, and 2nd execution. But failed to return a scold on
the 2nd time around and so it failed to proceed beyond that point.

That said, if someone is able to point out why a KeepAlive parameter needs
to be passed (contrary to what ES' s site defines how scroll works)

Thanks

Ramdev

On Tuesday, 11 November 2014 15:00:15 UTC-6, Ramdev Wudali wrote:

Hi:
What is the syntax for using the scroll API for searches using the
scala interface (elastic4s) ?
I am not able to find suitable documentation for this and any help is
appreciated.

Thanks

Ramdev

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8d8e40c4-149a-4c53-9753-a01839852478%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I've added an issue to clarify the usage of the scroll syntax in elastic4s.

On Wednesday, November 12, 2014 at 3:01:10 PM UTC, Ramdev Wudali wrote:

ok, So I figured this bit out with a few provisos........ ( there wasn't
a test that covered this case in the UnitTests)

Build the Search Requests like so :

{
search in "index/type" query
{
matchQuery("FIELD", field_value)
} scroll (KeepAlive - duration using ES duration syntax for eg: 1m -
indicating 1minute)
}.build

Once the query is built, the first query is executed like so :

client.execute(query)

The SearchResponse from the future returned, from executing the Query,
also returned a ScrollId

searchResponse.getScrollId

Subsequent Queries (to get scroll through the rest of the full results of
the query :

client.searchScroll(searchResponse.getScrollId,KeepAlive)

Keep in mind that the scrollId needs to be retrieved after each search
scroll call.

Even tho' there were two calls allowed for search scroll

client.searchScroll(scrollId) and
client.searchScroll(scrollId,KeepAlive)

Only the 2nd call actually worked in my case. the first call went thought
the first execution, and 2nd execution. But failed to return a scold on
the 2nd time around and so it failed to proceed beyond that point.

That said, if someone is able to point out why a KeepAlive parameter
needs to be passed (contrary to what ES' s site defines how scroll works)

Thanks

Ramdev

On Tuesday, 11 November 2014 15:00:15 UTC-6, Ramdev Wudali wrote:

Hi:
What is the syntax for using the scroll API for searches using the
scala interface (elastic4s) ?
I am not able to find suitable documentation for this and any help is
appreciated.

Thanks

Ramdev

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/5bfa31a4-bfe5-4c7d-bfc1-387de4ae32f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.