Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class LimitTokenCountAnalyzer

    This Lucene.Net.Analysis.Analyzer limits the number of tokens while indexing. It is a replacement for the maximum field length setting inside IndexWriter.

    Inheritance
    System.Object
    Lucene.Net.Analysis.Analyzer
    Lucene.Net.Analysis.AnalyzerWrapper
    LimitTokenCountAnalyzer
    Implements
    System.IDisposable
    Inherited Members
    AnalyzerWrapper.WrapReader(String, TextReader)
    AnalyzerWrapper.CreateComponents(String, TextReader)
    AnalyzerWrapper.GetPositionIncrementGap(String)
    AnalyzerWrapper.GetOffsetGap(String)
    AnalyzerWrapper.InitReader(String, TextReader)
    Analyzer.NewAnonymous(Func<String, TextReader, TokenStreamComponents>)
    Analyzer.NewAnonymous(Func<String, TextReader, TokenStreamComponents>, ReuseStrategy)
    Analyzer.NewAnonymous(Func<String, TextReader, TokenStreamComponents>, Func<String, TextReader, TextReader>)
    Analyzer.NewAnonymous(Func<String, TextReader, TokenStreamComponents>, Func<String, TextReader, TextReader>, ReuseStrategy)
    Analyzer.GetTokenStream(String, TextReader)
    Analyzer.GetTokenStream(String, String)
    Lucene.Net.Analysis.Analyzer.Strategy
    Lucene.Net.Analysis.Analyzer.Dispose()
    Analyzer.Dispose(Boolean)
    Lucene.Net.Analysis.Analyzer.GLOBAL_REUSE_STRATEGY
    Lucene.Net.Analysis.Analyzer.PER_FIELD_REUSE_STRATEGY
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Lucene.Net.Analysis.Miscellaneous
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public sealed class LimitTokenCountAnalyzer : AnalyzerWrapper, IDisposable

    Constructors

    | Improve this Doc View Source

    LimitTokenCountAnalyzer(Analyzer, Int32)

    Build an analyzer that limits the maximum number of tokens per field. This analyzer will not consume any tokens beyond the maxTokenCount limit

    Declaration
    public LimitTokenCountAnalyzer(Analyzer delegate, int maxTokenCount)
    Parameters
    Type Name Description
    Lucene.Net.Analysis.Analyzer delegate
    System.Int32 maxTokenCount
    See Also
    LimitTokenCountAnalyzer(Analyzer, Int32, Boolean)
    | Improve this Doc View Source

    LimitTokenCountAnalyzer(Analyzer, Int32, Boolean)

    Build an analyzer that limits the maximum number of tokens per field.

    Declaration
    public LimitTokenCountAnalyzer(Analyzer delegate, int maxTokenCount, bool consumeAllTokens)
    Parameters
    Type Name Description
    Lucene.Net.Analysis.Analyzer delegate

    the analyzer to wrap

    System.Int32 maxTokenCount

    max number of tokens to produce

    System.Boolean consumeAllTokens

    whether all tokens from the delegate should be consumed even if maxTokenCount is reached.

    Methods

    | Improve this Doc View Source

    GetWrappedAnalyzer(String)

    Declaration
    protected override Analyzer GetWrappedAnalyzer(string fieldName)
    Parameters
    Type Name Description
    System.String fieldName
    Returns
    Type Description
    Lucene.Net.Analysis.Analyzer
    Overrides
    AnalyzerWrapper.GetWrappedAnalyzer(String)
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()
    | Improve this Doc View Source

    WrapComponents(String, TokenStreamComponents)

    Declaration
    protected override TokenStreamComponents WrapComponents(string fieldName, TokenStreamComponents components)
    Parameters
    Type Name Description
    System.String fieldName
    Lucene.Net.Analysis.TokenStreamComponents components
    Returns
    Type Description
    Lucene.Net.Analysis.TokenStreamComponents
    Overrides
    AnalyzerWrapper.WrapComponents(String, TokenStreamComponents)

    Implements

    System.IDisposable

    See Also

    LimitTokenCountFilter
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 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.