randomize number of primary shards
xcontent header field order
Fix test
If shard group operation failed then also account for the fact that the replica operations failed