Guest User

ExtendedNameFilterFactory.java

a guest
May 19th, 2014
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. package org.apache.lucene.analysis;
  2.  
  3. import java.util.Map;
  4. import org.apache.lucene.analysis.util.AbstractAnalysisFactory;
  5. import org.apache.lucene.analysis.util.MultiTermAwareComponent;
  6. import org.apache.lucene.analysis.util.TokenFilterFactory;
  7.  
  8. public class ExtendedNameFilterFactory extends TokenFilterFactory
  9. implements MultiTermAwareComponent
  10. {
  11. int extendedWordCount;
  12.  
  13. public void init(Map<String, String> args)
  14. {
  15. super.init(args);
  16. assureMatchVersion();
  17. this.extendedWordCount = getInt("extendedWordCount", -1);
  18. }
  19.  
  20. public ExtendedNameFilter create(TokenStream input) {
  21. return new ExtendedNameFilter(this.luceneMatchVersion, input, this.extendedWordCount);
  22. }
  23.  
  24. public AbstractAnalysisFactory getMultiTermComponent()
  25. {
  26. return this;
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment