Changes to use elasticsearch lib instead of pyes