We have a cluster partitioned by a certain key for which we are using custom routing. We now are having a use-case where we have to request data across different key with the key list to be large. So wanted to understand how is the custom routing query processed? I know when we specify a list of routing keys, elastic search goes to all the shards mapping those sets of routing keys and fetches the data. I have a couple of questions around that
- Lets say the custom routing parameter array contains 1000 values. There are only 10 shards though. Will there be 1000 request internally with one for each routing or at max there will be 10 request with one request per shard.
- When returning data with query containing multiple routing values, does elasticsearch paginate the requests (sort request across all partitions) and return the requested page or it returns data partitioned by routing key.