lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Inconsistent Sort order for empty and null fields
Date Fri, 24 Jun 2011 20:45:21 GMT

: 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

Mime
View raw message