Hello there,
I'm getting myself into the Java API which is pretty hard for me (I find it's lacking some documentation and examples).
Based on what I read I wrote a little application which tries to inject many randomly generated documents (the mapping is always the same but the values are random) as fast as possible.
You can get the interesting part of the code here : https://gist.github.com/fdd620f6026e02c081e0
The performances aren't very good (I'm using 5 shards and 1 replicas with 2 computers). Am I doing it right ?
Notes :
- I tried to tweak the settings with setRefresh and setReplicationType when I bulkRequest.add() and bulkRequest.execute() but without sensible improvement (and I'm not sure about their meaning for both API calls)
- I tried to use bulkRequest.execute() with and without actionGet() and bulkResponse. I'm not sure as well about the meaning of this but what I think is that when I use actionGet() my app wait for the end of the indexing whereas without it the application ends faster but the nodes are still working. Correct me if I'm wrong please.
I would appreciate some help.
Best regards,
Clément.