elasticsearch plugin with angular and elastic.js