|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.util.AttributeSource
org.apache.lucene.analysis.TokenStream
org.apache.lucene.analysis.TokenFilter
org.apache.lucene.analysis.FilteringTokenFilter
org.apache.solr.analysis.KeepWordFilter
public final class KeepWordFilter
A TokenFilter that only keeps tokens with text contained in the required words. This filter behaves like the inverse of StopFilter.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource |
|---|
org.apache.lucene.util.AttributeSource.AttributeFactory, org.apache.lucene.util.AttributeSource.State |
| Field Summary |
|---|
| Fields inherited from class org.apache.lucene.analysis.TokenFilter |
|---|
input |
| Constructor Summary | |
|---|---|
KeepWordFilter(boolean enablePositionIncrements,
org.apache.lucene.analysis.TokenStream in,
org.apache.lucene.analysis.CharArraySet words)
The words set passed to this constructor will be directly used by this filter and should not be modified, |
|
KeepWordFilter(org.apache.lucene.analysis.TokenStream in,
Set<String> words,
boolean ignoreCase)
Deprecated. Use KeepWordFilter(boolean, TokenStream, CharArraySet) instead |
|
| Method Summary | |
|---|---|
boolean |
accept()
|
| Methods inherited from class org.apache.lucene.analysis.FilteringTokenFilter |
|---|
getEnablePositionIncrements, incrementToken, setEnablePositionIncrements |
| Methods inherited from class org.apache.lucene.analysis.TokenFilter |
|---|
close, end, reset |
| Methods inherited from class org.apache.lucene.util.AttributeSource |
|---|
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated
public KeepWordFilter(org.apache.lucene.analysis.TokenStream in,
Set<String> words,
boolean ignoreCase)
KeepWordFilter(boolean, TokenStream, CharArraySet) instead
public KeepWordFilter(boolean enablePositionIncrements,
org.apache.lucene.analysis.TokenStream in,
org.apache.lucene.analysis.CharArraySet words)
| Method Detail |
|---|
public boolean accept()
throws IOException
accept in class org.apache.lucene.analysis.FilteringTokenFilterIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||