Show / Hide Table of Contents

    Class PrefixAwareTokenFilter

    Joins two token streams and leaves the last token of the first stream available to be used when updating the token values in the second stream based on that token.

    The default implementation adds last prefix token end offset to the suffix token start and end offsets.

    NOTE: This filter might not behave correctly if used with custom IAttributes, i.e. IAttributes other than the ones located in Lucene.Net.Analysis.TokenAttributes.

    Inheritance
    System.Object
    AttributeSource
    TokenStream
    PrefixAwareTokenFilter
    Implements
    IDisposable
    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.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 class PrefixAwareTokenFilter : TokenStream, IDisposable

    Constructors

    | Improve this Doc View Source

    PrefixAwareTokenFilter(TokenStream, TokenStream)

    Declaration
    public PrefixAwareTokenFilter(TokenStream prefix, TokenStream suffix)
    Parameters
    Type Name Description
    TokenStream prefix
    TokenStream suffix

    Properties

    | Improve this Doc View Source

    Prefix

    Declaration
    public virtual TokenStream Prefix { get; set; }
    Property Value
    Type Description
    TokenStream
    | Improve this Doc View Source

    Suffix

    Declaration
    public virtual TokenStream Suffix { get; set; }
    Property Value
    Type Description
    TokenStream

    Methods

    | Improve this Doc View Source

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    | Improve this Doc View Source

    End()

    Declaration
    public override void End()
    Overrides
    TokenStream.End()
    | Improve this Doc View Source

    IncrementToken()

    Declaration
    public override sealed bool IncrementToken()
    Returns
    Type Description
    System.Boolean
    Overrides
    TokenStream.IncrementToken()
    | Improve this Doc View Source

    Reset()

    Declaration
    public override void Reset()
    Overrides
    TokenStream.Reset()
    | Improve this Doc View Source

    UpdateSuffixToken(Token, Token)

    The default implementation adds last prefix token end offset to the suffix token start and end offsets.

    Declaration
    public virtual Token UpdateSuffixToken(Token suffixToken, Token lastPrefixToken)
    Parameters
    Type Name Description
    Token suffixToken

    a token from the suffix stream

    Token lastPrefixToken

    the last token from the prefix stream

    Returns
    Type Description
    Token

    consumer token

    Implements

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