You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alan Woodward (Updated) (JIRA)" <ji...@apache.org> on 2012/02/28 12:33:48 UTC
[jira] [Updated] (LUCENE-3831) Passing a null fieldname to
MemoryFields#terms in MemoryIndex throws a NPE
[ https://issues.apache.org/jira/browse/LUCENE-3831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Woodward updated LUCENE-3831:
----------------------------------
Attachment: mindex-null-field.patch
Trivial fix - we just check if the passed in fieldname is null, and if it is, return null.
> 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
> 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