Elasticsearch 1.x support

Only tested in elasticsearch 1.4 so far