org.apache.lucene.analysis.tokenattributes
Interface PositionIncrementAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
PositionIncrementAttributeImpl, Token

public interface PositionIncrementAttribute
extends Attribute

The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.

The default value is one.

Some common uses for this are:

See Also:
TermPositions

Method Summary
 int getPositionIncrement()
          Returns the position increment of this Token.
 void setPositionIncrement(int positionIncrement)
          Set the position increment.
 

Method Detail

setPositionIncrement

void setPositionIncrement(int positionIncrement)
Set the position increment. The default value is one.

Parameters:
positionIncrement - the distance from the prior term

getPositionIncrement

int getPositionIncrement()
Returns the position increment of this Token.

See Also:
setPositionIncrement(int)


Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.