update scope to GLOBAL

This commit is contained in:
medcl 2015-11-26 16:02:31 +08:00
parent b8a8cb6ae2
commit c77cfcb6ef

View File

@ -25,15 +25,15 @@ public class IKIndicesAnalysis extends AbstractComponent {
super(settings); super(settings);
this.useSmart = settings.get("use_smart", "false").equals("true"); this.useSmart = settings.get("use_smart", "false").equals("true");
indicesAnalysisService.analyzerProviderFactories().put("ik", indicesAnalysisService.analyzerProviderFactories().put("ik",
new PreBuiltAnalyzerProviderFactory("ik", AnalyzerScope.INDICES, new PreBuiltAnalyzerProviderFactory("ik", AnalyzerScope.GLOBAL,
new IKAnalyzer(useSmart))); new IKAnalyzer(useSmart)));
indicesAnalysisService.analyzerProviderFactories().put("ik_smart", indicesAnalysisService.analyzerProviderFactories().put("ik_smart",
new PreBuiltAnalyzerProviderFactory("ik_smart", AnalyzerScope.INDICES, new PreBuiltAnalyzerProviderFactory("ik_smart", AnalyzerScope.GLOBAL,
new IKAnalyzer(true))); new IKAnalyzer(true)));
indicesAnalysisService.analyzerProviderFactories().put("ik_max_word", indicesAnalysisService.analyzerProviderFactories().put("ik_max_word",
new PreBuiltAnalyzerProviderFactory("ik_max_word", AnalyzerScope.INDICES, new PreBuiltAnalyzerProviderFactory("ik_max_word", AnalyzerScope.GLOBAL,
new IKAnalyzer(false))); new IKAnalyzer(false)));
indicesAnalysisService.tokenizerFactories().put("ik", indicesAnalysisService.tokenizerFactories().put("ik",