Update elasticsearch.js

Handle non plain _type or _id
Merge pull request #10 from lome/patch-1

Update elasticsearch.js