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.pritch...@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-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org