use of org.elasticsearch.index.settings.IndexSettingsModule in project crate by crate.
the class LuceneQueryBuilderTest method createAnalysisService.
private AnalysisService createAnalysisService(Settings indexSettings, Index index) {
Injector parentInjector = new ModulesBuilder().add(new SettingsModule(indexSettings), new EnvironmentModule(new Environment(indexSettings))).createInjector();
Injector injector = new ModulesBuilder().add(new IndexSettingsModule(index, indexSettings), new IndexNameModule(index), new AnalysisModule(indexSettings, parentInjector.getInstance(IndicesAnalysisService.class))).createChildInjector(parentInjector);
return injector.getInstance(AnalysisService.class);
}
Aggregations