indexer: move the script to IndexController
rename the libraries
init es: added the param ES_HOST