lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ninaS <nina...@gmx.de>
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]);
					break;
        }

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: http://www.nabble.com/NullPointerException-in-FieldDocSortedHitQueue.lessThan-with-custom-SortComparator-tp21702845p21786431.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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