add deprecated annotation to unused class

This commit is contained in:
medcl 2015-12-25 14:32:29 +08:00
parent c3c4b3c3a8
commit 2ea4c922de
4 changed files with 8 additions and 11 deletions

View File

@ -1,6 +1,7 @@
package org.elasticsearch.index.analysis;
@Deprecated
public class IkAnalysisBinderProcessor extends AnalysisModule.AnalysisBinderProcessor {

View File

@ -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);
}

View File

@ -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));
}

View File

@ -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());
// }
}