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

Duplicate keys in "collations" object with JSON response format

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.5
    • Fix Version/s: 6.6
    • Component/s: spellchecker
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      After upgrading Solr 6.3 -> 6.5 I've noticed a change in how json response writer outputs "collations" response key when spellchecking is enabled (wt=json&json.nl=arrarr)

      Solr 6.3:

      "collations":
      [
      ["collation",

      { "collationQuery":"the", "hits":48, "maxScore":"30.282", "misspellingsAndCorrections": [ ["thea","the"]]}

      ],
      ["collation",

      { "collationQuery":"tea", "hits":3, "maxScore":"2.936", "misspellingsAndCorrections": [ ["thea","tea"]]}

      ],
      ...

      Solr 6.5:

      "collations":{
      "collation":

      { "collationQuery":"the", "hits":43, "misspellingsAndCorrections": [ ["thea","the"]]}

      ,
      "collation":

      { "collationQuery":"tea", "hits":3, "misspellingsAndCorrections": [ ["thea","tea"]]}

      ,
      ...

      Solr 6.5 outputs object instead of an array, and it has duplicate keys which is not valid for JSON format.

      Any help is appreciated.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jdyer James Dyer
                Reporter:
                Eng1neer Nikita Pchelintsev
              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: