: 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.
a field containing the empty string (ie: "") is not the same as no field existing. regardless of how else you deal with your sorting problem, it's important to make sure you udnerstand that, because they are fundementally different. for instance: "field:[* TO *]" will match documents where you've indexed the empty string as a term, but it won't match documents where you haven't indexed any field value at all. -Hoss