Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E050900F for ; Tue, 28 Feb 2012 13:42:11 +0000 (UTC) Received: (qmail 30324 invoked by uid 500); 28 Feb 2012 13:42:10 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 30252 invoked by uid 500); 28 Feb 2012 13:42:10 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 30244 invoked by uid 99); 28 Feb 2012 13:42:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 13:42:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 13:42:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AA20C33E52D for ; Tue, 28 Feb 2012 13:41:46 +0000 (UTC) Date: Tue, 28 Feb 2012 13:41:46 +0000 (UTC) From: "Michael McCandless (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <1677005506.27958.1330436506698.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <268614943.27560.1330428708684.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3831) Passing a null fieldname to MemoryFields#terms in MemoryIndex throws a NPE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218171#comment-13218171 ] Michael McCandless commented on LUCENE-3831: -------------------------------------------- Hmm I don't think the Fields.terms API should be expected to accept null (eg I don't know if the other codecs will NPE). I'd rather fix span queries to not pass the null field. Is this happening in SpanTermQuery.getSpans()? > Passing a null fieldname to MemoryFields#terms in MemoryIndex throws a NPE > -------------------------------------------------------------------------- > > Key: LUCENE-3831 > URL: https://issues.apache.org/jira/browse/LUCENE-3831 > Project: Lucene - Java > Issue Type: Bug > Components: core/index > Affects Versions: 4.0 > Reporter: Alan Woodward > Assignee: Michael McCandless > Priority: Minor > Attachments: mindex-null-field.patch > > > I found this when querying a MemoryIndex using a RegexpQuery wrapped by a SpanMultiTermQueryWrapper. If the regexp doesn't match anything in the index, it gets rewritten to an empty SpanOrQuery with a null field value, which then triggers the NPE. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org