Update all ES queries to use Elasticsearch DSL (bug 1036168)

did you write this or copy from somewhere? seems brittle