prevent es_query from side effecting
Merge pull request #1813 from dimagi/elas

prevent es_query from side effecting