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

unquoted uuid values in json query response

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 9.3, 9.4
    • 9.6
    • None
    • None
    • linux, jdk 17

    Description

      Json query responses that contain UUID field values are malformed: the values are not properly quoted. Example:

       

      "docs":[{
        "id":"1",
        "eventId":d8fa5301-4f7b-4c14-aa0e-b891e20f16f5,
        "_version_":1787085364586872832
      }] 

      Steps to repro:

      Unpack solr 9.4.0 and start with `bin/solr -f`.

      Run the shell script:

       

      baseurl="http://localhost:8983"
      
      curl -X POST "$baseurl/solr/admin/cores?action=CREATE&&name=sample&configSet=_default"
      
      curl -H 'Content-Type: application/json' --data-binary '{"add-field-type": {"name":"uuid", "class":"solr.UUIDField"}}' "$baseurl/solr/sample/schema"
      
      curl -H 'Content-Type: application/json' --data-binary '{"add-field": {"name": "eventId", "type":"uuid"}}' "$baseurl/solr/sample/schema"
      
      curl -H 'Content-Type: application/json' --data-binary '{"id": "1", "eventId": "d8fa5301-4f7b-4c14-aa0e-b891e20f16f5"}' "$baseurl/solr/sample/update/json/docs?commit=true"
      
      curl "$baseurl/solr/sample/query?q=*:*"
      

      This is likely a regression from SOLR-16691.

      This was first reported in https://lists.apache.org/thread/b717gcmjj92vxgq48g4ho8wct3zm4rct and something was done in SOLR-10653 but it seems the issue persists. The latest CI build solr-9.5.0-jenkins725.tgz still reproduces.

      I reported the issue again in https://lists.apache.org/thread/zfgz4oh23b3njklgjs4cqjn6p7ctz3ow but no response yet.

       

       

      Attachments

        Issue Links

        Activity

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

          People

            epugh Eric Pugh
            mbakhoff Märt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 50m
              50m

              Slack

                Issue deployment