fix elastic search query