On Thu, Feb 7, 2008 at 6:03 PM, André Warnier <[EMAIL PROTECTED]> wrote:

> ...
> Does anyone have an example of how this works ?
> (or an explanation in plain French-speaker-friendly tutorial-like English
> ?)
>

Do you mean "how to make it work for you" or "how does it work inside"?
The first option is easier to explain (though I know no French :))
When you create an IndexWritier you provide it an Analyzer.
That analyzer is used when a document is added to the index.
The analyzer.getPositionIncrementGap() specifies the position
gap between separate additions of same field. By default it
returns 0 (which is not working well in your example). To modify this
you can override this method in "your" analyzer to return a nonzero gap,
for example 5. This is easy when subclassing any existing analyzer.

Doron


> Thanks,
> André
>

Reply via email to