Solr
  1. Solr
  2. SOLR-417

Move SortSpec to top level class and cleanup

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: search
    • Labels:
      None

      Description

      Move SortSpec from within IndexSchema.

      see discussion: http://www.nabble.com/QueryParsing.SortSpec-tf4840762.html

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        7d 19h 45m 1 Ryan McKinley 28/Nov/07 19:16
        Resolved Resolved Closed Closed
        1989d 15h 23m 1 Uwe Schindler 10/May/13 11:40
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Ryan McKinley made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Ryan McKinley added a comment -

        committed in #599071

        Show
        Ryan McKinley added a comment - committed in #599071
        Ryan McKinley made changes -
        Assignee Ryan McKinley [ ryantxu ]
        Ryan McKinley made changes -
        Field Original Value New Value
        Attachment SOLR-417-SortSpec.patch [ 12369934 ]
        Hide
        Ryan McKinley added a comment - - edited

        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 not, then we just make something like:

          public static SortSpec parseSpec(String sortSpec, IndexSchema schema) 
          {
            Sort sort = parseLuceneSort(sortSpec, schema);
            if( sort != null ) {
              return new SortSpec( sort, -1 );
            }
            return null;
          }
        
        Show
        Ryan McKinley added a comment - - edited 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 not, then we just make something like: public static SortSpec parseSpec( String sortSpec, IndexSchema schema) { Sort sort = parseLuceneSort(sortSpec, schema); if ( sort != null ) { return new SortSpec( sort, -1 ); } return null ; }
        Ryan McKinley created issue -

          People

          • Assignee:
            Ryan McKinley
            Reporter:
            Ryan McKinley
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development