Karl Wettin wrote:


7 jul 2008 kl. 13.04 skrev Michael McCandless:


If we make this change (migrate to "boolean TokenStream.reset()"), what would IndexWriter do if it calls reset and false is returned?

I don't think the writer ever should call reset(), it is the consumer who is passing a stream to the writer that needs to make sure they are passing a valid stream. It is the consumer that has to do something in case they have exhausted a stream that can not be resetted. I.e. the consumer will need to wrap it in a cache of some kind.

Actually DocumentsWriter already calls reset() now before pulling tokens from the TokenStream, but, I agree it really shouldn't have to.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to