lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: NullPointer Exception in MemoryIndex.MemoryIndexReader
Date Wed, 23 Jan 2013 16:59:13 GMT
This is not expected: the method should return null if the field isn't
in the FieldInfos.

Can you open an issue?  Thanks!

Mike McCandless

http://blog.mikemccandless.com

On Wed, Jan 23, 2013 at 11:27 AM, Ricky Pritchett
<ricky.pritchett@gmail.com> wrote:
> Greetings,
>
> Version: Lucene 4.1
>
> I'm currently a user of the MemoryIndex, and I've noticed that after
> Lucene-4515 patch, I experience NullPointer Exceptions when searching on an
> index with a query that has a field that's not in the index.
>
> The NullPointer is thrown at line 1141:
>
> public DocValues normValues(String field) {
>       if (fieldInfos.get(field).omitsNorms())  <---- //If fieldInfos
> doesn't contain the field then a NullPointer is thrown.
>         return null;
>
> Is this expected behavior?
>
> Thanks,
>
> Ricky
>
>
>
> --
> "If you can make one heap of all your winnings, And risk it on one turn of
> pitch-and-toss, And lose, and start again at your beginnings, And never
> breathe a word about your loss"
> --  Rudyard Kipling

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message