org.apache.solr.analysis
Class KeepWordFilter
java.lang.Object
org.apache.lucene.util.AttributeSource
org.apache.lucene.analysis.TokenStream
org.apache.lucene.analysis.TokenFilter
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 804726 2009-08-16 17:28:58Z yonik $
Methods inherited from class org.apache.lucene.util.AttributeSource |
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toString |
KeepWordFilter
public KeepWordFilter(TokenStream in,
Set<String> words,
boolean ignoreCase)
incrementToken
public boolean incrementToken()
throws IOException
- Overrides:
incrementToken
in class TokenStream
- Throws:
IOException
Copyright © 2010 Apache Software Foundation. All Rights Reserved.