implemented elastic search query