Improve elasticsearch query