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

REGRESSION ReturnFields incorrect parse fields with hyphen - breaks existing "fl=my-field-name" type usecases

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

Details

    Description

      fl=my-hyphen-field in query params parsed as "my" instead of "my-hyphen-field".

      OAS.search.ReturnFields use method getId() from OAS.search.QueryParsing
      in which check chars "if (!Character.isJavaIdentifierPart(ch) && ch != '.')"
      Hyphen is not JavaIdentifierPart and this check break when first "-" is found.

      This problem solve by passing '-' to check:
      if (!Character.isJavaIdentifierPart(ch) && ch != '.' && ch != '-') break;

      But I don't know how it can affect on whole project.

      Attachments

        1. SOLR-2719.patch
          1 kB
          Yonik Seeley
        2. SOLR-2719.patch
          12 kB
          Luca Cavanna
        3. SOLR-2719.patch
          10 kB
          Luca Cavanna

        Issue Links

        Activity

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

          People

            yseeley@gmail.com Yonik Seeley
            sharky Nik V. Babichev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment