no need to cache the analyzer providers
This commit is contained in:
parent
4ba2453369
commit
dc5bb20331
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue