A comparator that compares
ShardRoutinginstances based on various properties. Instances are ordered as follows.
- First, system indices are ordered before non-system indices
- Then indices are ordered by their priority, in descending order (index.priority)
- Then newer indices are ordered before older indices, based on their creation date. This benefits time-series indices, where newer indices are considered more urgent (index.creation_date)
- Lastly the index names are compared, which is useful when a date is baked into the index