use of com.gitblit.service.LuceneService in project gitblit by gitblit.
the class LuceneExecutorTest method newLuceneExecutor.
private LuceneService newLuceneExecutor() {
MemorySettings settings = new MemorySettings();
settings.put(Keys.git.repositoriesFolder, GitBlitSuite.REPOSITORIES);
XssFilter xssFilter = new AllowXssFilter();
RuntimeManager runtime = new RuntimeManager(settings, xssFilter, GitBlitSuite.BASEFOLDER).start();
UserManager users = new UserManager(runtime, null).start();
RepositoryManager repos = new RepositoryManager(runtime, null, users);
return new LuceneService(settings, repos);
}
use of com.gitblit.service.LuceneService in project gitblit by gitblit.
the class RepositoryManager method configureLuceneIndexing.
protected void configureLuceneIndexing() {
luceneExecutor = new LuceneService(settings, this);
String frequency = settings.getString(Keys.web.luceneFrequency, "2 mins");
int mins = TimeUtils.convertFrequencyToMinutes(frequency, 2);
scheduledExecutor.scheduleAtFixedRate(luceneExecutor, 1, mins, TimeUnit.MINUTES);
logger.info("Lucene will process indexed branches every {} minutes.", mins);
}
Aggregations