Fix elastic search sort query