Class CodepointCountFilter
Removes words that are too long or too short from the stream.
Note: Length is calculated as the number of Unicode codepoints.
Inheritance
AttributeSource
TokenStream
TokenFilter
CodepointCountFilter
Implements
Inherited Members
TokenStream.Dispose()
AttributeSource.GetAttributeFactory()
AttributeSource.GetAttributeClassesEnumerator()
AttributeSource.GetAttributeImplsEnumerator()
AttributeSource.AddAttributeImpl(Attribute)
AttributeSource.AddAttribute<T>()
AttributeSource.HasAttributes
AttributeSource.HasAttribute<T>()
AttributeSource.GetAttribute<T>()
AttributeSource.ClearAttributes()
AttributeSource.CaptureState()
AttributeSource.RestoreState(AttributeSource.State)
AttributeSource.GetHashCode()
AttributeSource.ReflectWith(IAttributeReflector)
AttributeSource.CloneAttributes()
AttributeSource.CopyTo(AttributeSource)
AttributeSource.ToString()
Namespace: Lucene.Net.Analysis.Miscellaneous
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public sealed class CodepointCountFilter : FilteringTokenFilter, IDisposable
Constructors
CodepointCountFilter(LuceneVersion, TokenStream, int, int)
Create a new CodepointCountFilter. This will filter out tokens whose Lucene.Net.Analysis.TokenAttributes.ICharTermAttribute is either too short (CodePointCount(char[], int, int) < min) or too long (CodePointCount(char[], int, int) > max).
Declaration
public CodepointCountFilter(LuceneVersion version, TokenStream @in, int min, int max)
Parameters
Type | Name | Description |
---|---|---|
LuceneVersion | version | the Lucene match version |
TokenStream | in | the Lucene.Net.Analysis.TokenStream to consume |
int | min | the minimum length |
int | max | the maximum length |
Methods
Accept()
Override this method and return if the current input token should be returned by IncrementToken().
Declaration
protected override bool Accept()
Returns
Type | Description |
---|---|
bool |