Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class KeepWordFilter

    A Lucene.Net.Analysis.TokenFilter that only keeps tokens with text contained in the required words. This filter behaves like the inverse of StopFilter.

    @since solr 1.3

    Inheritance
    object
    AttributeSource
    TokenStream
    TokenFilter
    FilteringTokenFilter
    KeepWordFilter
    Implements
    IDisposable
    Inherited Members
    FilteringTokenFilter.IncrementToken()
    FilteringTokenFilter.Reset()
    FilteringTokenFilter.EnablePositionIncrements
    FilteringTokenFilter.SetEnablePositionIncrements(bool)
    FilteringTokenFilter.End()
    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 KeepWordFilter : FilteringTokenFilter, IDisposable

    Constructors

    KeepWordFilter(LuceneVersion, TokenStream, CharArraySet)

    Create a new KeepWordFilter.

    NOTE: The words set passed to this constructor will be directly used by this filter and should not be modified.

    Declaration
    public KeepWordFilter(LuceneVersion version, TokenStream @in, CharArraySet words)
    Parameters
    Type Name Description
    LuceneVersion version

    the Lucene match version

    TokenStream in

    the Lucene.Net.Analysis.TokenStream to consume

    CharArraySet words

    the words to keep

    KeepWordFilter(LuceneVersion, bool, TokenStream, CharArraySet)

    A Lucene.Net.Analysis.TokenFilter that only keeps tokens with text contained in the required words. This filter behaves like the inverse of StopFilter.

    @since solr 1.3

    Declaration
    [Obsolete("enablePositionIncrements=false is not supported anymore as of Lucene 4.4.")]
    public KeepWordFilter(LuceneVersion version, bool enablePositionIncrements, TokenStream @in, CharArraySet words)
    Parameters
    Type Name Description
    LuceneVersion version
    bool enablePositionIncrements
    TokenStream in
    CharArraySet words

    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
    Overrides
    FilteringTokenFilter.Accept()

    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.