Method GetPositionIncrementGap
GetPositionIncrementGap(String)
Invoked before indexing a IIndexableField instance if terms have already been added to that field. This allows custom analyzers to place an automatic position increment gap between IIndexableField 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 IIndexableField instances, are in successive positions, allowing exact PhraseQuery matches, for instance, across IIndexableField instance boundaries.
Declaration
public virtual int GetPositionIncrementGap(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fieldName | IIndexableField name being indexed. |
Returns
Type | Description |
---|---|
System.Int32 | position increment gap, added to the next token emitted from GetTokenStream(String, TextReader).
this value must be |