Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: General
Inconsistent Sort order for empty and null fields
 

Index | Next | Previous | View Flat


jfeldmar at ais

Jun 22, 2011, 8:57 AM


Views: 457
Permalink
Inconsistent Sort order for empty and null fields

I tried searching for an answer to my question but haven't found anything
relevant.

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
empty
value
value
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: http://lucene.472066.n3.nabble.com/Inconsistent-Sort-order-for-empty-and-null-fields-tp3096175p3096175.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Subject User Time
Inconsistent Sort order for empty and null fields jfeldmar at ais Jun 22, 2011, 8:57 AM
    Re: Inconsistent Sort order for empty and null fields suyalpravesh at yahoo Jun 24, 2011, 5:37 AM
    Re: Inconsistent Sort order for empty and null fields hossman_lucene at fucit Jun 24, 2011, 1:45 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.