Show / Hide Table of Contents

    Class LengthFilter

    Removes words that are too long or too short from the stream.

    Note: Length is calculated as the number of UTF-16 code units.

    Inheritance
    System.Object
    AttributeSource
    TokenStream
    TokenFilter
    FilteringTokenFilter
    LengthFilter
    Implements
    IDisposable
    Inherited Members
    FilteringTokenFilter.m_version
    FilteringTokenFilter.IncrementToken()
    FilteringTokenFilter.Reset()
    FilteringTokenFilter.EnablePositionIncrements
    FilteringTokenFilter.SetEnablePositionIncrements(Boolean)
    FilteringTokenFilter.End()
    TokenFilter.m_input
    TokenFilter.Dispose(Boolean)
    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.Equals(Object)
    AttributeSource.ReflectAsString(Boolean)
    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 LengthFilter : FilteringTokenFilter, IDisposable

    Constructors

    | Improve this Doc View Source

    LengthFilter(LuceneVersion, TokenStream, Int32, Int32)

    Create a new LengthFilter. This will filter out tokens whose CharTermAttribute is either too short (Length < min) or too long (Length > max).

    Declaration
    public LengthFilter(LuceneVersion version, TokenStream in, int min, int max)
    Parameters
    Type Name Description
    LuceneVersion version

    the Lucene match version

    TokenStream in

    the TokenStream to consume

    System.Int32 min

    the minimum length

    System.Int32 max

    the maximum length

    | Improve this Doc View Source

    LengthFilter(LuceneVersion, Boolean, TokenStream, Int32, Int32)

    Declaration
    public LengthFilter(LuceneVersion version, bool enablePositionIncrements, TokenStream in, int min, int max)
    Parameters
    Type Name Description
    LuceneVersion version
    System.Boolean enablePositionIncrements
    TokenStream in
    System.Int32 min
    System.Int32 max

    Methods

    | Improve this Doc View Source

    Accept()

    Declaration
    protected override bool Accept()
    Returns
    Type Description
    System.Boolean
    Overrides
    FilteringTokenFilter.Accept()

    Implements

    IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)