no need to cache the analyzer providers

This commit is contained in:
kimchy 2010-05-18 02:49:17 +03:00
parent 4ba2453369
commit dc5bb20331
1 changed files with 0 additions and 8 deletions

View File

@ -39,8 +39,6 @@ import static org.elasticsearch.util.collect.Maps.*;
*/
public class AnalysisService extends AbstractIndexComponent implements CloseableComponent {
private final ImmutableMap<String, AnalyzerProvider> analyzerProviders;
private final ImmutableMap<String, NamedAnalyzer> analyzers;
private final ImmutableMap<String, TokenizerFactory> tokenizers;
@ -84,8 +82,6 @@ public class AnalysisService extends AbstractIndexComponent implements Closeable
analyzerProviders.put("default_search", analyzerProviders.get("default"));
}
this.analyzerProviders = ImmutableMap.copyOf(analyzerProviders);
Map<String, NamedAnalyzer> analyzers = newHashMap();
for (AnalyzerProvider analyzerFactory : analyzerProviders.values()) {
analyzers.put(analyzerFactory.name(), new NamedAnalyzer(analyzerFactory.name(), analyzerFactory.get()));
@ -151,10 +147,6 @@ public class AnalysisService extends AbstractIndexComponent implements Closeable
return defaultAnalyzer();
}
public AnalyzerProvider analyzerProvider(String name) {
return analyzerProviders.get(name);
}
public TokenizerFactory tokenizer(String name) {
return tokenizers.get(name);
}