Hi,

I suspect you are hitting an issue fixed about a month ago:
https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9aa5b73

But the fix has not yet been released; it will be in Lucene 6.4.0
which should be out in a week or two.

The NPE happens when some segments are missing the range field, i.e.
not all documents in your index have the range field.

Mike McCandless

http://blog.mikemccandless.com


On Wed, Jan 11, 2017 at 5:14 AM, Michel, Jerome <jmic...@forcepoint.com> wrote:
> Hi
>
> I come to you again for a problem around the usage of IntRangeField. At 
> indexing time, I use the IntRangeField(String name, final int[] min, final 
> int[] max) constructor with 1 dimension for both min and max, and the name 
> for my field in Index. When inspecting with Luke, all semms OK and the fields 
> are inserted as wanted.
>
> But at search time, when I use the IntRangeField.newIntersectsQuery(String 
> field, final int[] min, final int[] max) to generate the query for the given 
> field. Whenever I use those two methods for creating/searching, I get this 
> exception:
> java.lang.NullPointerException
>                 at 
> org.apache.lucene.document.RangeFieldQuery.checkFieldInfo(RangeFieldQuery.java:101)
>                 at 
> org.apache.lucene.document.RangeFieldQuery.access$400(RangeFieldQuery.java:43)
>                 at 
> org.apache.lucene.document.RangeFieldQuery$1.scorer(RangeFieldQuery.java:169)
>                 at 
> org.apache.lucene.search.BoostQuery$1.scorer(BoostQuery.java:147)
>                 at 
> org.apache.lucene.search.BooleanWeight.scorer(BooleanWeight.java:389)
>                 at 
> org.apache.lucene.search.BooleanWeight.scorer(BooleanWeight.java:389)
>                 at org.apache.lucene.search.Weight.bulkScorer(Weight.java:135)
>                 at 
> org.apache.lucene.search.BooleanWeight.bulkScorer(BooleanWeight.java:370)
>                 at 
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:666)
>                 at 
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)
> ...
>
> Did I missed something on the usage of the IntRangeField class? Or there is a 
> workaround to allow me to use it?
>
> Best regards,
> Jerome

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

Reply via email to