public final class CodepointCountFilter extends FilteringTokenFilter
Note: Length is calculated as the number of Unicode codepoints.
AttributeSource.StateversioninputDEFAULT_TOKEN_ATTRIBUTE_FACTORYDEFAULT_ATTRIBUTE_FACTORY| Constructor and Description |
|---|
CodepointCountFilter(TokenStream in,
int min,
int max)
Create a new
CodepointCountFilter. |
CodepointCountFilter(Version version,
TokenStream in,
int min,
int max)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept()
Override this method and return if the current input token should be returned by
FilteringTokenFilter.incrementToken(). |
end, getEnablePositionIncrements, incrementToken, reset, setEnablePositionIncrementscloseaddAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toStringpublic CodepointCountFilter(TokenStream in, int min, int max)
CodepointCountFilter. This will filter out tokens whose
CharTermAttribute is either too short (Character.codePointCount(char[], int, int)
< min) or too long (Character.codePointCount(char[], int, int) > max).in - the TokenStream to consumemin - the minimum lengthmax - the maximum length@Deprecated public CodepointCountFilter(Version version, TokenStream in, int min, int max)
CodepointCountFilter(TokenStream, int, int)public boolean accept()
FilteringTokenFilterFilteringTokenFilter.incrementToken().accept in class FilteringTokenFilterCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.