lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Teruhiko Kurosaka <K...@basistech.com>
Subject Clarification on TokenStream.close() needed
Date Tue, 20 Oct 2009 19:27:02 GMT
Hi,
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.

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


Mime
View raw message