// Create elasticsearch server
ElasticSearchManager esManager = new ElasticSearchManager(configuration.datadir);
environment.manage(esManager);
// Create daos
ArticleDao articleDao = new ArticleDaoImpl(esManager.getNode(), getJson());
UserDao userDao = new UserDaoImpl(esManager.getNode(), getJson());
// Create caching authenticator
CachingAuthenticator<BasicCredentials, User> authenticator = CachingAuthenticator.wrap(new ElasticSearchAuthenticator(userDao),
CacheBuilderSpec.parse("maximumSize=5,expireAfterAccess=5m"));