Feature/elasticsearch v2

please put the init of the elasticsearch client into the database.js file and export it.