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

Duplicate keys in "collations" object with JSON response format

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 6.5
    • 6.6
    • spellchecker
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: