Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.apache.lucene.analysis;
- import java.util.Map;
- import org.apache.lucene.analysis.util.AbstractAnalysisFactory;
- import org.apache.lucene.analysis.util.MultiTermAwareComponent;
- import org.apache.lucene.analysis.util.TokenFilterFactory;
- public class ExtendedNameFilterFactory extends TokenFilterFactory
- implements MultiTermAwareComponent
- {
- int extendedWordCount;
- public void init(Map<String, String> args)
- {
- super.init(args);
- assureMatchVersion();
- this.extendedWordCount = getInt("extendedWordCount", -1);
- }
- public ExtendedNameFilter create(TokenStream input) {
- return new ExtendedNameFilter(this.luceneMatchVersion, input, this.extendedWordCount);
- }
- public AbstractAnalysisFactory getMultiTermComponent()
- {
- return this;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment