Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 48193 invoked from network); 1 May 2006 18:16:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 May 2006 18:16:20 -0000 Received: (qmail 54739 invoked by uid 500); 1 May 2006 18:16:18 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 54701 invoked by uid 500); 1 May 2006 18:16:17 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 54689 invoked by uid 99); 1 May 2006 18:16:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 May 2006 11:16:17 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 May 2006 11:16:17 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7B2907142A7 for ; Mon, 1 May 2006 18:15:47 +0000 (GMT) Message-ID: <8064487.1146507347501.JavaMail.jira@brutus> Date: Mon, 1 May 2006 18:15:47 +0000 (GMT+00:00) From: "Hoss Man (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Created: (LUCENE-560) NPE in SpanNear when used as exclusion for SpanNot MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N NPE in SpanNear when used as exclusion for SpanNot -------------------------------------------------- Key: LUCENE-560 URL: http://issues.apache.org/jira/browse/LUCENE-560 Project: Lucene - Java Type: Bug Components: Search Reporter: Hoss Man Attachments: LUCENE-560-test.patch It seems that if you try to use a SpanNear query as the "exclude" argument to a SpanNot query, you encounter an NPE. The stack trace looks like the following (as of trunk r398639) ... [junit] java.lang.NullPointerException [junit] at org.apache.lucene.search.spans.NearSpans.doc(NearSpans.java:227) [junit] at org.apache.lucene.search.spans.SpanNotQuery$1.next(SpanNotQuery.java:85) [junit] at org.apache.lucene.search.spans.SpanScorer.next(SpanScorer.java:51) [junit] at org.apache.lucene.search.Scorer.score(Scorer.java:47) [junit] at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:132) patch to TestBasics demonstrating bug will be attached shortly. I believe the problem is that SpanNotQuery$1 is calling "excludeSpans.doc()" without ever calling "excludeSpans.next()" ... this "works" when the exclude query is a TermQuery becuase the value returned by doc() is -1 ... but with SpanNearQuery tries to pop the initial value off of a queue which hasn't been initialized yet. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org