Rewrite tests for Elasticsearch 1