Fix ElasticSearch support.

- https://secure.phabricator.com/D9321
- http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-queries.html