public final class CrankyTokenFilter extends TokenFilter
This can be used to simulate a buggy analyzer in IndexWriter, where we must delete the document but not abort everything in the buffer.
AttributeSource.StateinputDEFAULT_TOKEN_ATTRIBUTE_FACTORY| Constructor and Description |
|---|
CrankyTokenFilter(TokenStream input,
Random random)
Creates a new CrankyTokenFilter
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
end() |
boolean |
incrementToken() |
void |
reset() |
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic CrankyTokenFilter(TokenStream input, Random random)
public boolean incrementToken()
throws IOException
incrementToken in class TokenStreamIOExceptionpublic void end()
throws IOException
end in class TokenFilterIOExceptionpublic void reset()
throws IOException
reset in class TokenFilterIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class TokenFilterIOExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.