Guest User

Untitled

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