lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless" <>
Subject Re: Token termBuffer issues
Date Tue, 24 Jul 2007 18:42:43 GMT

"Doron Cohen" <> wrote:
> > Agreed, so we can't change the API.  So the next/nextDirect proposal
> > should work well: it doesn't change the API yet would allow consumers
> > that don't require "full private copy" of every Token, like
> > DocumentsWriter, to have good performance.
> If we eventually go this way, my preferred API for reuse is
>    next(Token resToken)
> where a non-null resToken reads as
>   "if supported, please use this object for the returned result"

OK, I'm taking this approach right now in the benchmarks I just
tested.  I added this method:

  boolean next(Token resToken)

which returns true if it has updated resToken with another token,
else false if end-of-stream was hit.


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

View raw message