To quote the guys... "patches are always welcome".
Glad you found a solution
Erick
On Mon, Feb 2, 2009 at 8:35 AM, ninaS wrote:
>
> I already found another solution: I don't use a custom SortComparator.
> Another solution would be to define a default value for null.
>
> Would be nice if lucene
I already found another solution: I don't use a custom SortComparator.
Another solution would be to define a default value for null.
Would be nice if lucene in future would be able
to search by null values also if a custom SortComparator is used.
To tell you more:
public class MyComparator ext
Ah, I see. The indention and lack of braces fooled me.
You might consider making things as easy as possible when
asking people to volunteer their time trying to help you.
Then I'm unsure what's the problem, you could try showing
us the entire stack trace. Have you defined your own compare
function
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:{
Well, just glancing at the code you have no assurance that
cj != null. See below.
On Wed, Jan 28, 2009 at 4:58 AM, ninaS wrote:
>
> Hello,
>
> I am using a custom SortComparator implementation where I need to override
> a
> method in order to handle Null values:
>
> @Override
> public S