Java-api Bulk indexing

Hello,

I try to use the a bulk operation to index data with the java api, but
allways get Excpetions; As it's not explained in guide I wanted to
kindly ask how it's done correctly.

I tried this way: https://gist.github.com/dd8c43718c7a462f4ab1

any help warmly welcome :slight_smile:

I am missing the actual exception of the failed bulk execution. But, it seems like you are missing to set the type on the IndexRequest.
On Sunday, March 13, 2011 at 1:33 PM, K.B. wrote:

Hello,

I try to use the a bulk operation to index data with the java api, but
allways get Excpetions; As it's not explained in guide I wanted to
kindly ask how it's done correctly.

I tried this way: Java-Code · GitHub

any help warmly welcome :slight_smile:

Hey Shay,

thank you very much! - it was indeed the missing .type(type)! Now as I
can use Bulk vs. indivial requests the time needed to index my 1400
big objects went down from 3.0s/ 2.0s (initial/ db-warmed-up) to only
1.599s/ 0.6 s (initial/ db-warmed-up) time for a complete drop and
reindex of all objects!

Its really cool to see how blazing fast this is :slight_smile:

Best,

Korbinian

PS: I'd like toadd this to the manual in the java-api section - does
this mean I have to fork the https://github.com/elasticsearch/elasticsearch.github.com,
update the doc's and then send a pull-request?

On 14 Mrz., 10:52, Shay Banon shay.ba...@elasticsearch.com wrote:

I am missing the actual exception of the failed bulk execution. But, it seems like you are missing to set the type on the IndexRequest.

On Sunday, March 13, 2011 at 1:33 PM, K.B. wrote:

Hello,

I try to use the a bulk operation to index data with the java api, but
allways get Excpetions; As it's not explained in guide I wanted to
kindly ask how it's done correctly.

I tried this way:Java-Code · GitHub

any help warmly welcome :slight_smile:

On Monday, March 14, 2011 at 12:35 PM, K.B. wrote:
Hey Shay,

thank you very much! - it was indeed the missing .type(type)! Now as I
can use Bulk vs. indivial requests the time needed to index my 1400
big objects went down from 3.0s/ 2.0s (initial/ db-warmed-up) to only
1.599s/ 0.6 s (initial/ db-warmed-up) time for a complete drop and
reindex of all objects!

Its really cool to see how blazing fast this is :slight_smile:
cool! :). Its usually gets faster as things warm up.

Best,

Korbinian

PS: I'd like toadd this to the manual in the java-api section - does
this mean I have to fork the https://github.com/elasticsearch/elasticsearch.github.com,
update the doc's and then send a pull-request?
Yep.

On 14 Mrz., 10:52, Shay Banon shay.ba...@elasticsearch.com wrote:

I am missing the actual exception of the failed bulk execution. But, it seems like you are missing to set the type on the IndexRequest.

On Sunday, March 13, 2011 at 1:33 PM, K.B. wrote:

Hello,

I try to use the a bulk operation to index data with the java api, but
allways get Excpetions; As it's not explained in guide I wanted to
kindly ask how it's done correctly.

I tried this way:Java-Code · GitHub

any help warmly welcome :slight_smile: