apply fix for change in ESQuery
Merge pull request #4066 from dimagi/fix-esquery-change

apply fix for change in ESQuery