C# 클래스 org.apache.lucene.analysis.miscellaneous.LimitTokenPositionFilter

This TokenFilter limits its emitted tokens to those with positions that are not greater than the configured limit.

By default, this filter ignores any tokens in the wrapped {@code TokenStream} once the limit has been exceeded, which can result in {@code reset()} being called prior to {@code incrementToken()} returning {@code false}. For most {@code TokenStream} implementations this should be acceptable, and faster then consuming the full stream. If you are wrapping a {@code TokenStream} which requires that the full stream of tokens be exhausted in order to function properly, use the #LimitTokenPositionFilter(TokenStream,int,boolean) consumeAllTokens option.

상속: TokenFilter
파일 보기 프로젝트 열기: paulirwin/lucene.net 1 사용 예제들

공개 메소드들

메소드 설명
LimitTokenPositionFilter ( TokenStream @in, int maxTokenPosition )

Build a filter that only accepts tokens up to and including the given maximum position. This filter will not consume any tokens with position greater than the maxTokenPosition limit.

LimitTokenPositionFilter ( TokenStream @in, int maxTokenPosition, bool consumeAllTokens )

Build a filter that limits the maximum position of tokens to emit.

incrementToken ( ) : bool
reset ( ) : void

메소드 상세

LimitTokenPositionFilter() 공개 메소드

Build a filter that only accepts tokens up to and including the given maximum position. This filter will not consume any tokens with position greater than the maxTokenPosition limit.
public LimitTokenPositionFilter ( TokenStream @in, int maxTokenPosition )
@in TokenStream
maxTokenPosition int max position of tokens to produce (1st token always has position 1) ///

LimitTokenPositionFilter() 공개 메소드

Build a filter that limits the maximum position of tokens to emit.
public LimitTokenPositionFilter ( TokenStream @in, int maxTokenPosition, bool consumeAllTokens )
@in TokenStream
maxTokenPosition int max position of tokens to produce (1st token always has position 1)
consumeAllTokens bool whether all tokens from the wrapped input stream must be consumed /// even if maxTokenPosition is exceeded.

incrementToken() 공개 메소드

public incrementToken ( ) : bool
리턴 bool

reset() 공개 메소드

public reset ( ) : void
리턴 void