Added compatibility with elasticsearch 1.x
Merge pull request #146 from jucaf/master

Added compatibility with elasticsearch 1.x