Show / Hide Table of Contents

    Class LimitTokenCountAnalyzer

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

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

    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
    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
    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
    Analyzer
    | Improve this Doc View Source

    ToString()

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

    WrapComponents(String, TokenStreamComponents)

    Declaration
    protected override TokenStreamComponents WrapComponents(string fieldName, TokenStreamComponents components)
    Parameters
    Type Name Description
    System.String fieldName
    TokenStreamComponents components
    Returns
    Type Description
    TokenStreamComponents

    See Also

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