Invoked before indexing a Fieldable instance if terms have already been added to that field. This allows custom analyzers to place an automatic position increment gap between Fieldable instances using the same field name. The default value position increment gap is 0. With a 0 position increment gap and the typical default token position increment of 1, all terms in a field, including across Fieldable instances, are in successive positions, allowing exact PhraseQuery matches, for instance, across Fieldable instance boundaries.

Namespace: Lucene.Net.Analysis
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public virtual int GetPositionIncrementGap(
	string fieldName
)
Visual Basic
Public Overridable Function GetPositionIncrementGap ( _
	fieldName As String _
) As Integer
Visual C++
public:
virtual int GetPositionIncrementGap(
	String^ fieldName
)

Parameters

fieldName
Type: System..::..String
Fieldable name being indexed.

Return Value

position increment gap, added to the next token emitted from {@link #TokenStream(String,Reader)}

See Also