: But how can you use both the MissingStringLastComparatorSource and also your
: own custom SortComparator (i.e. having a custom getComparable() method)?
:
: I have tried the obvious, which was to make my custom SortComparator extend
: MissingStringLastComparatorSource instead of SortComparator. B
return DEFAULT_ORDER;
}
}
}
==
-Theo
--
View this message in context:
http://www.nabble.com/Sorting-on-a-field-that-can-have-null-values-tf3568102.html#a10404218
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
excluding them completely is a slightly differnet task, you don't need to
index a special marker value, you can just use a
RangeFilter (or ConstantScoreRangeQuery) to ensure you only get docs with
a value for that field (ie: field:[* TO *])
Excellent, this is a much better solution. BTW, adding
: If i rememebr correctly (you'll have to test this) sorting on a field
: which doesn't exist for every doc does what you would want (docs with
: values are listed before docs without)
: The actual behavior is different than described above. I modified
: TestSort.java:
: The actual order of the
I'm copying this reply from a topic with the same title from the defunct
'lucene-user' list. My comments follow it.
: I thought of putting empty strings instead of null values but I think
: empty strings are put first in the list while sorting which is the
: reverse of what anyone would want.
in