add deprecated annotation to unused class
This commit is contained in:
parent
c3c4b3c3a8
commit
2ea4c922de
@ -1,6 +1,7 @@
|
|||||||
package org.elasticsearch.index.analysis;
|
package org.elasticsearch.index.analysis;
|
||||||
|
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class IkAnalysisBinderProcessor extends AnalysisModule.AnalysisBinderProcessor {
|
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.dic.Dictionary;
|
||||||
import org.wltea.analyzer.lucene.IKAnalyzer;
|
import org.wltea.analyzer.lucene.IKAnalyzer;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class IkAnalyzerProvider extends AbstractIndexAnalyzerProvider<IKAnalyzer> {
|
public class IkAnalyzerProvider extends AbstractIndexAnalyzerProvider<IKAnalyzer> {
|
||||||
private final IKAnalyzer analyzer;
|
private final IKAnalyzer analyzer;
|
||||||
private boolean useSmart=false;
|
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) {
|
public IkAnalyzerProvider(Index index, IndexSettingsService indexSettingsService, Environment env, @Assisted String name, @Assisted Settings settings) {
|
||||||
super(index, indexSettingsService.getSettings(), name, settings);
|
super(index, indexSettingsService.getSettings(), name, settings);
|
||||||
Dictionary.initial(new Configuration(env));
|
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);
|
analyzer=new IKAnalyzer(useSmart);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import org.wltea.analyzer.cfg.Configuration;
|
|||||||
import org.wltea.analyzer.dic.Dictionary;
|
import org.wltea.analyzer.dic.Dictionary;
|
||||||
import org.wltea.analyzer.lucene.IKTokenizer;
|
import org.wltea.analyzer.lucene.IKTokenizer;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class IkTokenizerFactory extends AbstractTokenizerFactory {
|
public class IkTokenizerFactory extends AbstractTokenizerFactory {
|
||||||
private final Settings settings;
|
private final Settings settings;
|
||||||
private boolean useSmart=false;
|
private boolean useSmart=false;
|
||||||
@ -18,7 +19,7 @@ public class IkTokenizerFactory extends AbstractTokenizerFactory {
|
|||||||
@Inject
|
@Inject
|
||||||
public IkTokenizerFactory(Index index, IndexSettingsService indexSettingsService,Environment env, @Assisted String name, @Assisted Settings settings) {
|
public IkTokenizerFactory(Index index, IndexSettingsService indexSettingsService,Environment env, @Assisted String name, @Assisted Settings settings) {
|
||||||
super(index, indexSettingsService.getSettings(), name, settings);
|
super(index, indexSettingsService.getSettings(), name, settings);
|
||||||
this.settings=indexSettingsService.getSettings();
|
this.settings=settings;
|
||||||
Dictionary.initial(new Configuration(env));
|
Dictionary.initial(new Configuration(env));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,13 +43,7 @@ public class AnalysisIkPlugin extends Plugin {
|
|||||||
return Collections.<Module>singletonList(new IKIndicesAnalysisModule());
|
return Collections.<Module>singletonList(new IKIndicesAnalysisModule());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ConfiguredExampleModule extends AbstractModule {
|
// public void onModule(AnalysisModule module) {
|
||||||
@Override
|
// module.addProcessor(new IkAnalysisBinderProcessor());
|
||||||
protected void configure() {
|
// }
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onModule(AnalysisModule module) {
|
|
||||||
module.addProcessor(new IkAnalysisBinderProcessor());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user