Add support elasticsearch 1.x

elasticsearch 1.0 has got changed api url rules.
It is a patch to work with latest elasticsearch.