lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <>
Subject Re: Spans, appended fields, and term positions
Date Mon, 21 Nov 2005 17:55:08 GMT
On 11/21/05, Erik Hatcher <> wrote:
> Modifying Analyzer as you have suggested would
> require DocumentWriter additionally keep track of the field names
> and note when one is used again.

For position increments, it doesn't have to be tracked. The patch to
DocumentWriter could also be:

      int position = fieldPositions[fieldNumber];
+      if (position>0) position+=analyzer.getPositionIncrementGap(fieldName)

Talk of position increments feels like it belongs more in Analyzer. 
Do you actually need to control that per field instance (rather than
per field name/type?)

I think your patch straight-forward and probably the simplest for the
user, and the most flexible (if it's needed to that degree). I just
don't know if anyone has objections to expanding the Field class even
more (and with analysis stuff), so I'm throwing out possible

Now hiring --

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message