How to copy data of one specific shard (indices A) to another indices (indices B)?


#1

I have to copy data of one specific shard (indices A) to another indices (indices B). How can this be done?


(Mark Walkom) #2

I don't believe you can extract it from one particular shard like that, unless you are using routing?


#3

Can I re-index the data using a query to search for a specific shard from Indices A and insert it into Indices B?


(Mark Walkom) #4

Not unless you are using routing.


#5

The size of each shard varies. I think we route data to specific shards.


(Mark Walkom) #6

If you know the routing keys used you might be able to do it that way.


#7

As a test I can re-index by querying the source by shard id and verify if the data is going to the intended destination shard. @warkolm can you please let me know your opinion?


(Mark Walkom) #8

There is no such thing as a query by shard ID. The closest you would get would be to query by the routing key.