Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 50439 invoked from network); 9 Dec 2009 22:23:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Dec 2009 22:23:13 -0000 Received: (qmail 32801 invoked by uid 500); 9 Dec 2009 22:23:10 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 32729 invoked by uid 500); 9 Dec 2009 22:23:10 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 32719 invoked by uid 99); 9 Dec 2009 22:23:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 22:23:10 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [85.25.71.29] (HELO mail.troja.net) (85.25.71.29) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 22:23:08 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.troja.net (Postfix) with ESMTP id 4ABA1D36003 for ; Wed, 9 Dec 2009 23:22:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.troja.net Received: from mail.troja.net ([127.0.0.1]) by localhost (megaira.troja.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ja1daw1DW6bs for ; Wed, 9 Dec 2009 23:22:36 +0100 (CET) Received: from VEGA (port-83-236-62-54.dynamic.qsc.de [83.236.62.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.troja.net (Postfix) with ESMTPSA id 0F3C1D36001 for ; Wed, 9 Dec 2009 23:22:36 +0100 (CET) From: "Uwe Schindler" To: References: <9fad81fd0912091048y8bf5fc1qe9bd408a99220eae@mail.gmail.com> Subject: RE: MatchAllDocsQuery and InstantiatedIndex on Lucene 2.9.1 Date: Wed, 9 Dec 2009 23:22:33 +0100 Message-ID: <467107581D194DA996B89CCA45E93D31@VEGA> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <9fad81fd0912091048y8bf5fc1qe9bd408a99220eae@mail.gmail.com> Thread-index: Acp5AEDxYc5nTGr2QPidS1KQVoOxSgAHa2HQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 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: uwe@thetaphi.de > -----Original Message----- > From: Jason Fennell [mailto:jdfennell@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-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org