yes! adding a sleep after Future.get() of bulk op 'fixed' my test - thank
you.

what you said re: bulk op was submitted but not processed makes sense
(perhaps there is a separate API to query for op's completion status?) but
what is puzzling to me is that comments in source of *BulkResponse* seem to
imply it is constructed *after* op completes:

Holding a response for each item responding (in order) of the
 * bulk requests. Each item holds the index/type/id is operated on, and if
it failed or not (with the
 * failure message).

..thus I was expecting that by the time
*ListenableActionFuture<BulkResponse>.get()
*returns the op is actually completed (not just submitted). Otherwise
status properties in embedded BulkItemResponse would not be useful, right?



On Thu, Jan 9, 2014 at 8:13 PM, InquiringMind <[email protected]>wrote:

> A quick guess: The first one works because the first document for that
> type is indexed and therefore the type is created when the operation
> returns.
>
> But the second one doesn't work because there is a refresh interval
> between the completion of a bulk load operation and the actual document
> being added. And since it's the first document in the type, the type won't
> exist until that first document is indexed. Which is likely exactly what
> you want: Bulk operations need to defer until they are processed to allow
> for optimizations. I don't know Lucene internals, but a B+Tree loads vastly
> quicker when keys are presorted in bulk instead of added and committed one
> by one.
>
> The experts can chime in later, and if I'm wrong or off base anywhere I
> welcome the correction!
>
> Brian
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "elasticsearch" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/elasticsearch/V1A1HbJFio4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/6f3374ff-b623-47ca-9e93-3eb2630b6ef3%40googlegroups.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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAJwaA22WFt%2B%2BQ2z%3DvBMpL_8ChjBB19OQcDWtTzwy8bd5xQ1sjw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to