Looks good for me, thanks.

Ryan McKinley (JIRA) wrote:
    [ https://issues.apache.org/jira/browse/SOLR-417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544118 ] 

ryantxu edited comment on SOLR-417 at 11/20/07 3:44 PM:
--------------------------------------------------------------

Moves SortSpec to its own class and cleans up lots of null checking.

The one notable change with API consequences is that I changed:

{code:java}
public static SortSpec parseSort(String sortSpec, IndexSchema schema);
{code}
 to:
{code:java}
public static Sort parseSort(String sortSpec, IndexSchema schema)
{code}

Is this an OK change?  Is that part of the non-fungible API?  If not, then we just make something like:

{code:java}
  public static SortSpec parseSpec(String sortSpec, IndexSchema schema) 
  {
    Sort sort = parseLuceneSort(sortSpec, schema);
    if( sort != null ) {
      return new SortSpec( sort, -1 );
    }
    return null;
  }
{code}

      was (Author: ryantxu):
    Moves SortSpec to its own class and cleans up lots of null checking.

The one notable change with API consequences is that I changed:

public static SortSpec parseSort(String sortSpec, IndexSchema schema);
 to:
public static Sort parseSort(String sortSpec, IndexSchema schema)

Is this an OK change?  Is that part of the non-fungible API?  If yes, then we just make something like:

{code:java}
  public static SortSpec parseSpec(String sortSpec, IndexSchema schema) 
  {
    Sort sort = parseLuceneSort(sortSpec, schema);
    if( sort != null ) {
      return new SortSpec( sort, -1 );
    }
    return null;
  }
{code}
  
  
Move SortSpec to top level class and cleanup
--------------------------------------------

                Key: SOLR-417
                URL: https://issues.apache.org/jira/browse/SOLR-417
            Project: Solr
         Issue Type: Improvement
         Components: search
           Reporter: Ryan McKinley
           Priority: Minor
            Fix For: 1.3

        Attachments: SOLR-417-SortSpec.patch


Move SortSpec from within IndexSchema.
see discussion: http://www.nabble.com/QueryParsing.SortSpec-tf4840762.html
    

  

--
Patrick O'Leary


You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles.
 Do you understand this? 
And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat.
  - Albert Einstein
View Patrick O Leary's LinkedIn profileView Patrick O Leary's profile

Reply via email to