E.g. in flex, the wrappers around old enums do not ever call close(), too. I am not sure if this is a problem for TermEnums wrapped by TermsEnum there. The new enums do not implement j.io.Closeable at all.
----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Michael McCandless [mailto:luc...@mikemccandless.com] > Sent: Sunday, December 27, 2009 1:11 PM > To: java-dev@lucene.apache.org > Cc: java-u...@lucene.apache.org > Subject: Re: TermDocs.close > > It's confusing... but it is in fact safe not closing it (for Lucene's > core IndexReader impls) -- because the IndexInputs that > SegmentTermDocs/Positions use are clones, their close methods are a > no-op. > > Mike > > On Sun, Dec 27, 2009 at 6:37 AM, John Wang <john.w...@gmail.com> wrote: > > Hi: > > I see TermDocs.close not being called when created with TermQuery: > > TermQuery creates it and passes to TermScorer, and is never closed. > > I see TermDocs.close actually closes the input stream. > > Is it safe not closing TermDocs? > > Thanks > > -John > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-dev-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org