lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ninaS <>
Subject Re: NullPointerException in FieldDocSortedHitQueue.lessThan with custom SortComparator
Date Mon, 02 Feb 2009 09:18:30 GMT

That's not true: have a look at the "else"-block.

The problem is that lucene's FieldDocSortedHitQueue does only test for null
values if uses the type FieldDoc.STRING. With FieldDoc.CUSTOM lucene assumes
ci to be never null:

FieldDocSortedHitQueue 163-166:

        case SortField.CUSTOM:{
					c = docA.fields[i].compareTo (docB.fields[i]);

If I have null values in the field that I want to sort by: I can not use a
custom SortComparator.
View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message