lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfeldmar <>
Subject Inconsistent Sort order for empty and null fields
Date Wed, 22 Jun 2011 15:57:00 GMT
I tried searching for an answer to my question but haven't found anything

When I query solr and sort by a given field in ASCENDING order, the records
which do not have a value for this field (i.e. null) appear AFTER the valued
records. The records that have an empty string for the field appear BEFORE
the valued records. This produces a visually inconsistent result.

example: sort by x asc
empty (because null)
empty (because null)

Logically, all the empty values should appear before the non-empty values
when sorting ascending. I could make all the null fields into empty strings
but this seems like a waste of resources.

Is there some setting in solr to force null fields to appear before valued
fields when sorting in ascending order?

Thank you

View this message in context:
Sent from the Lucene - General mailing list archive at

View raw message