Should BulkProcessor And RestHighLevelClient be shared in multi-thread?

In elasticsearch wiki, the BulkProcessor and the RestHighLevelClient are all thread safe, so they can be applied in multi-thread.

In my application, I want to improve bulk perforance, so I want to use multi-thread.

Also we know, the BulkProcessor needs RestClient as it's constructor parameter. So the best way is just one RestClient and one BulkProcessor? or just one RestClient and each BulkProcessor for every thread? or each RestClient and each BulkProcessor for every thread?

In my test, 10000 documents with size about 6M may costs more than 1 minute. As time goes by, the indexing speed may be slower.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.