C# Class org.apache.lucene.analysis.miscellaneous.LimitTokenCountAnalyzer

This Analyzer limits the number of tokens while indexing. It is a replacement for the maximum field length setting inside org.apache.lucene.index.IndexWriter.
Inheritance: AnalyzerWrapper
Mostrar archivo Open project: paulirwin/lucene.net Class Usage Examples

Public Methods

Method Description
LimitTokenCountAnalyzer ( Analyzer @delegate, int maxTokenCount )

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

LimitTokenCountAnalyzer ( Analyzer @delegate, int maxTokenCount, bool consumeAllTokens )

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

ToString ( ) : string

Protected Methods

Method Description
getWrappedAnalyzer ( string fieldName ) : Analyzer
wrapComponents ( string fieldName, TokenStreamComponents components ) : TokenStreamComponents

Method Details

LimitTokenCountAnalyzer() public method

Build an analyzer that limits the maximum number of tokens per field. This analyzer will not consume any tokens beyond the maxTokenCount limit
public LimitTokenCountAnalyzer ( Analyzer @delegate, int maxTokenCount )
@delegate Analyzer
maxTokenCount int

LimitTokenCountAnalyzer() public method

Build an analyzer that limits the maximum number of tokens per field.
public LimitTokenCountAnalyzer ( Analyzer @delegate, int maxTokenCount, bool consumeAllTokens )
@delegate Analyzer
maxTokenCount int max number of tokens to produce
consumeAllTokens bool whether all tokens from the delegate should be consumed even if maxTokenCount is reached.

ToString() public method

public ToString ( ) : string
return string

getWrappedAnalyzer() protected method

protected getWrappedAnalyzer ( string fieldName ) : Analyzer
fieldName string
return Analyzer

wrapComponents() protected method

protected wrapComponents ( string fieldName, TokenStreamComponents components ) : TokenStreamComponents
fieldName string
components TokenStreamComponents
return TokenStreamComponents