"Yonik Seeley" <[EMAIL PROTECTED]> wrote:
> On Nov 18, 2007 6:07 AM, Michael McCandless <[EMAIL PROTECTED]>
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to