lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <yo...@lucidimagination.com>
Subject Re: Clarification on TokenStream.close() needed
Date Tue, 20 Oct 2009 19:48:07 GMT
2009/10/20 Teruhiko Kurosaka <Kuro@basistech.com>:
> My Tokenizer started showing an error when I switched
> to Solr 1.4 dev version.  I am not too confident but
> it seems that Solr 1.4 calls close() on my Tokenizer
> before calling reset(Reader) in order to reuse
> the Tokenizer.  That is, close() is called more than
> once.

Is this when indexing a document, or querying a document.
close() should only be called once.

If indexing, it would be closed in Lucene at DocInverterPerField.java:197

-Yonik
http://www.lucidimagination.com



> The API doc of close() reads:
> Releases resources associated with this stream.
>
> So I thought close() shold be called only once,
> and the Tokenizer objects cannot be reused after
> close() is called.  Is my interpretation correct?
>
> If my interpretation is wrong and it is legal to
> call close() more than once, where is the best place
> to free per-instance resources?
>
> T. "Kuro" Kurosaka
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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


Mime
View raw message