Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class PatternKeywordMarkerFilter

    Marks terms as keywords via the Lucene.Net.Analysis.TokenAttributes.IKeywordAttribute. Each token that matches the provided pattern is marked as a keyword by setting Lucene.Net.Analysis.TokenAttributes.IKeywordAttribute.IsKeyword to true.

    Inheritance
    object
    AttributeSource
    TokenStream
    TokenFilter
    KeywordMarkerFilter
    PatternKeywordMarkerFilter
    Implements
    IDisposable
    Inherited Members
    KeywordMarkerFilter.IncrementToken()
    TokenFilter.End()
    TokenFilter.Reset()
    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(bool)
    AttributeSource.ReflectWith(IAttributeReflector)
    AttributeSource.CloneAttributes()
    AttributeSource.CopyTo(AttributeSource)
    AttributeSource.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Analysis.Miscellaneous
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public sealed class PatternKeywordMarkerFilter : KeywordMarkerFilter, IDisposable

    Constructors

    PatternKeywordMarkerFilter(TokenStream, Regex)

    Create a new PatternKeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer matches the provided Regex via the Lucene.Net.Analysis.TokenAttributes.IKeywordAttribute.

    Declaration
    public PatternKeywordMarkerFilter(TokenStream @in, Regex pattern)
    Parameters
    Type Name Description
    TokenStream in

    Lucene.Net.Analysis.TokenStream to filter

    Regex pattern

    the pattern to apply to the incoming term buffer

    Methods

    IsKeyword()

    Marks terms as keywords via the Lucene.Net.Analysis.TokenAttributes.IKeywordAttribute. Each token that matches the provided pattern is marked as a keyword by setting Lucene.Net.Analysis.TokenAttributes.IKeywordAttribute.IsKeyword to true.

    Declaration
    protected override bool IsKeyword()
    Returns
    Type Description
    bool
    Overrides
    KeywordMarkerFilter.IsKeyword()

    Implements

    IDisposable
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.