lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless" <luc...@mikemccandless.com>
Subject Re: new Token API
Date Sun, 18 Nov 2007 17:43:45 GMT

"Yonik Seeley" <yonik@apache.org> wrote:
> On Nov 18, 2007 6:07 AM, Michael McCandless <lucene@mikemccandless.com>
> wrote:
> > How about: if you are re-using your token, then whoever set the
> > payload, positionIncrement, etc, should always clear/reset it on the
> > next token?
> 
> I considered this, but it doesn't really seem practical since a filter
> doesn't necessarily know what other filters are in the chain.  It
> would also end up costing extra performance (just like calling clear()
> does).

Ahh, I see: each filter can't reset payload to null when it has no
payload to add because perhaps another filter before it had wanted to
add a payload to this token (for example).  Got it.

OK then let's call clear() before tokenStream.next().

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message