[ 
https://issues.apache.org/jira/browse/SOLR-2134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan McKinley updated SOLR-2134:
--------------------------------

    Attachment: SOLR-2134-SortMissingLast.patch

An updated patch with tests that *almost* works good.  

The tests for int and long fields work great, for float/double fields, it is 
not behaving as I would expect.  Sort desc does not put the missing fields at 
the bottom.

I follow the same pattern that works for int/long:
{code:java}

      case FLOAT:
        if( sortMissingLast ) {
          missingValue = top ? Float.MIN_VALUE : Float.MAX_VALUE;
        }
        else if( sortMissingFirst ) {
          missingValue = top ? Float.MAX_VALUE : Float.MIN_VALUE;
        }
        return new SortField( new FloatValuesCreator( field.getName(), 
            FieldCache.NUMERIC_UTILS_FLOAT_PARSER, flags ), 
top).setMissingValue( missingValue );
{code}


Any ideas?






> Trie* fields should support sortMissingLast=true, and deprecate Sortable* 
> Field Types
> -------------------------------------------------------------------------------------
>
>                 Key: SOLR-2134
>                 URL: https://issues.apache.org/jira/browse/SOLR-2134
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Ryan McKinley
>         Attachments: SOLR-2134-SortMissingLast.patch, 
> SOLR-2134-SortMissingLast.patch, SOLR-2134-SortMissingLast.patch
>
>
> With the changes in LUCENE-2649, the FieldCache also returns if the bit is 
> valid or not.  This is enough to support sortMissingLast=true with Trie* 
> fields.  Then we can get rid of the Sortable* fields

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to