Thanks for the fast reply & patch! On Thu, Dec 10, 2009 at 12:20 PM, Karl Wettin <karl.wet...@gmail.com> wrote:
> https://issues.apache.org/jira/browse/LUCENE-2144 > > 9 dec 2009 kl. 23.22 skrev Uwe Schindler: > > > This is a bug in InstantiatedIndex. The termDoc(null) was added to get all >> documents. This was never implemented in Instantiated Index. Can you open >> an >> issue? >> >> There maybe other queries fail because of this (e.g. >> FieldCacheRangeFilter,...). >> >> ----- >> Uwe Schindler >> H.-H.-Meier-Allee 63, D-28213 Bremen >> http://www.thetaphi.de >> eMail: u...@thetaphi.de >> >> -----Original Message----- >>> From: Jason Fennell [mailto:jdfenn...@gmail.com] >>> Sent: Wednesday, December 09, 2009 7:48 PM >>> To: java-user@lucene.apache.org >>> Subject: MatchAllDocsQuery and InstantiatedIndex on Lucene 2.9.1 >>> >>> I'm trying to upgrade our application from Lucene 2.4.1 to Lucene 2.9.1. >>> I've been using an InstantiatedIndex to do a bunch of unit testing, but >>> am >>> running into a some problems with Lucene 2.9.1. >>> In particular, when I try to run a MatchAllDocsQuery on my >>> InstantiatedIndex >>> (which worked fine on 2.4.1) a NullPointerException is raised. I think I >>> tracked down the problem in the Lucene source. >>> >>> In the 2.9.1 MatchAllDocsQuery, the MatchAllScorer retrieves termDocs >>> from >>> the IndexReader passed to it with >>> >>> reader.termDocs(null) >>> >>> which I assume is supposed to return all termDocs. However, tracing this >>> call down >>> >>> IndexReader.termDocs(term) calls InstantiatedTermDocs.seek( >>> term) calls InstantiatedIndex.findTerm(term) >>> >>> which is implemented as >>> >>> InstantiatedTerm findTerm(Term term) { >>> return findTerm(term.field(), term.text()); >>> } >>> >>> which, since term is null, results in a NullPointerException. This seems >>> to >>> me like an bug either in the MatchAllDocsQuery implementation (the >>> version >>> in 2.4.1 did not use termDocs, so did not pass through this null), or a >>> bug >>> in the implementation of InstantiatedIndex. >>> >>> Any suggestions on what I can do about this? I definitely can't get rid >>> of >>> the MatchAllDocsQuery and don't really want to move back to a slow >>> RAMDirectory. >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >