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.State
input
DEFAULT_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, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public CrankyTokenFilter(TokenStream input, Random random)
public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
public void end() throws IOException
end
in class TokenFilter
IOException
public void reset() throws IOException
reset
in class TokenFilter
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class TokenFilter
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.