Bulk Requests and Routing

Is there a difference in indexing performance between a bulk request whose individual items have the same routing value vs a bulk request whose items have different values?

Background: I'm fetching rows from a DB to be indexed in Elasticsearch. I want to fetch the documents from the DB, ordered by the routing value, then create the BulkRequests. Since there are many rows I'd like to avoid ordering but don't know if this will affect the BulkRequest indexing performance since the routing values will be random.

The request will be parsed the same no matter what approach you take.

I can imagine that a bulk that goes to a single shard will take a little longer than one that goes to a few, but whether or not it's massively slower, you'd need to test.

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