Question about scrolling

I want to fetch all the stored documents in ES and I see that there is a
"scroll" search type to easily support this.

My question is - if during the scroll, another client updates a particular
document that I did not fetch yet - will I get this document as it was when
I've started the scroll or an updated one?
In other words, does scroll create a snapshot of the data when it starts or
returns the documents as they are when it reaches them?

Thanks,
Zaar

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Zaar

It takes a snapshot of the index at the time the scrolled search starts. So
any later changes don't change the results of the scroll.

Note: deep scrolling on a sorted result set becomes slower, the deeper you
get. If you want to pull back lots of documents (eg for reindexing an
index), then you should use search_type=scan, which disables sorting and
keeps deep scrolling performant

clint

On 24 October 2013 12:30, Zaar Hai haizaar@gmail.com wrote:

I want to fetch all the stored documents in ES and I see that there is a
"scroll" search type to easily support this.

My question is - if during the scroll, another client updates a particular
document that I did not fetch yet - will I get this document as it was when
I've started the scroll or an updated one?
In other words, does scroll create a snapshot of the data when it starts
or returns the documents as they are when it reaches them?

Thanks,
Zaar

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks Clinton!

These are excellent news.
My dataset is relatively small and I still need sorting because I need
documented returned ordered by their doc type (I have several dozens of doc
types) - unless there is another efficient way to do it.

Thanks again.
Zaar

On Thursday, October 24, 2013 2:47:50 PM UTC+3, Clinton Gormley wrote:

Hi Zaar

It takes a snapshot of the index at the time the scrolled search starts.
So any later changes don't change the results of the scroll.

Note: deep scrolling on a sorted result set becomes slower, the deeper you
get. If you want to pull back lots of documents (eg for reindexing an
index), then you should use search_type=scan, which disables sorting and
keeps deep scrolling performant

clint

On 24 October 2013 12:30, Zaar Hai <hai...@gmail.com <javascript:>> wrote:

I want to fetch all the stored documents in ES and I see that there is a
"scroll" search type to easily support this.

My question is - if during the scroll, another client updates a
particular document that I did not fetch yet - will I get this document as
it was when I've started the scroll or an updated one?
In other words, does scroll create a snapshot of the data when it starts
or returns the documents as they are when it reaches them?

Thanks,
Zaar

--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.