Fixed ordering issue with elastic search