提交 2ea4c922 编写于 作者: weixin_43283383's avatar weixin_43283383

add deprecated annotation to unused class

上级 c3c4b3c3
package org.elasticsearch.index.analysis;
@Deprecated
public class IkAnalysisBinderProcessor extends AnalysisModule.AnalysisBinderProcessor {
......
......@@ -10,6 +10,7 @@ import org.wltea.analyzer.cfg.Configuration;
import org.wltea.analyzer.dic.Dictionary;
import org.wltea.analyzer.lucene.IKAnalyzer;
@Deprecated
public class IkAnalyzerProvider extends AbstractIndexAnalyzerProvider<IKAnalyzer> {
private final IKAnalyzer analyzer;
private boolean useSmart=false;
......@@ -18,7 +19,7 @@ public class IkAnalyzerProvider extends AbstractIndexAnalyzerProvider<IKAnalyzer
public IkAnalyzerProvider(Index index, IndexSettingsService indexSettingsService, Environment env, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettingsService.getSettings(), name, settings);
Dictionary.initial(new Configuration(env));
useSmart = indexSettingsService.getSettings().get("use_smart", "false").equals("true");
useSmart = settings.get("use_smart", "false").equals("true");
analyzer=new IKAnalyzer(useSmart);
}
......
......@@ -11,6 +11,7 @@ import org.wltea.analyzer.cfg.Configuration;
import org.wltea.analyzer.dic.Dictionary;
import org.wltea.analyzer.lucene.IKTokenizer;
@Deprecated
public class IkTokenizerFactory extends AbstractTokenizerFactory {
private final Settings settings;
private boolean useSmart=false;
......@@ -18,7 +19,7 @@ public class IkTokenizerFactory extends AbstractTokenizerFactory {
@Inject
public IkTokenizerFactory(Index index, IndexSettingsService indexSettingsService,Environment env, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettingsService.getSettings(), name, settings);
this.settings=indexSettingsService.getSettings();
this.settings=settings;
Dictionary.initial(new Configuration(env));
}
......
......@@ -43,13 +43,7 @@ public class AnalysisIkPlugin extends Plugin {
return Collections.<Module>singletonList(new IKIndicesAnalysisModule());
}
public static class ConfiguredExampleModule extends AbstractModule {
@Override
protected void configure() {
}
}
public void onModule(AnalysisModule module) {
module.addProcessor(new IkAnalysisBinderProcessor());
}
// public void onModule(AnalysisModule module) {
// module.addProcessor(new IkAnalysisBinderProcessor());
// }
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册