Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2606

Solr sort no longer works on field names with some punctuation in them

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1, 3.2, 3.3
    • 3.4, 4.0-ALPHA
    • search
    • None
    • Linux

    Description

      We just upgraded from Solr 1.4 to 3.2. For the most part the upgrade went fine, however we discovered that sorting on field names with dashes in them is no longer working properly. For example, the following query used to work:

      http://[our solr server]/select/?q=computer&sort=static-need-binary+asc

      and now it gives this error:

      HTTP Status 400 - undefined field static

      type Status report

      message undefined field static

      description The request sent by the client was syntactically incorrect (undefined field static).

      It appears the parser for sorting has been changed so that it now tokenizes differently, and assumes field names cannot have dashes in them. However, field names clearly can have dashes in them. The exact same query which worked fine for us in 1.4 is now breaking in 3.2. Changing the sort field to use a field name that doesn't have a dash in it works just fine.

      Attachments

        1. SOLR-2606.patch
          9 kB
          Chris M. Hostetter
        2. SOLR-2606.patch
          3 kB
          Chris M. Hostetter
        3. SOLR-2606.test.only.patch
          2 kB
          Chris M. Hostetter

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hossman Chris M. Hostetter
            mitsu Mitsu Hadeishi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment