fix ES 1.0 incompatibility
Merge pull request #4401 from dimagi/make-es-1.0-compatible

fix ES 1.0 incompatibility