Elasticsearch is running in a cluster with multiple shards. Two are primary, the rest are not. Using version 5.5.2.
I have several records with the same address but different document id. When I sort by address the order of the items within the same address varies. I assumed this is because the secondary ordering criteria is the document order.
When I run the search using the preference of
_primary, the order is consistent. When I run the search using a preference of
_replica, the sort is not consistent.
Is this expected behavior for primary and replica? Why does the order differ on replica?