Add support Elasticsearch 1.x version of gem

Hi

It seems it doesn't support recent gems of elasticsearch.
c.f. https://rubygems.org/gems/elasticsearch/versions

Thus, this patch adds supporting elasticsearch 1.x gems.