[INV-414] Order search results

@clicktravel-craig Ready for review. thanks J
How about:

for(Entry<String, SortOrder.Direction> entry : sortOrder.entrySet()) {
  String index = entry.getKey();
  SortOrder.Direction direction = entry.getValue();
   // more stuff


}