org.apache.solr.analysis
Class KeepWordFilter

java.lang.Object
  extended by org.apache.lucene.analysis.TokenStream
      extended by org.apache.lucene.analysis.TokenFilter
          extended by org.apache.solr.analysis.KeepWordFilter

public final class KeepWordFilter
extends TokenFilter

A TokenFilter that only keeps tokens with text contained in the required words. This filter behaves like the inverse of StopFilter.

Since:
solr 1.3
Version:
$Id: KeepWordFilter.java 643465 2008-04-01 16:10:19Z gsingers $

Field Summary
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
KeepWordFilter(TokenStream in, Set<String> words, boolean ignoreCase)
           
 
Method Summary
 Token next(Token in)
           
 
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, reset
 
Methods inherited from class org.apache.lucene.analysis.TokenStream
next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeepWordFilter

public KeepWordFilter(TokenStream in,
                      Set<String> words,
                      boolean ignoreCase)
Method Detail

next

public final Token next(Token in)
                 throws IOException
Overrides:
next in class TokenStream
Throws:
IOException


Copyright © 2008 Apache Software Foundation. All Rights Reserved.