Hi Guys,

 

I’m using solr 6.5.0, which is fantastic, and I’ve come across an issue with 
the collations in the spellcheck response. 

 

The way the json is structured collations is an object with each collation 
named ‘collation’ where it should be an array with multiple ‘collation’ object 
elements. I’m using the ajax solr javascript library and because of the above 
each successive collation object writes over the previous, leaving the last and 
least likely collation.

 

I was going to dig deeper into ajax solr, but I’m pretty sure sure the issue is 
with the solr json response.

 

Below is the snippet of code relevant to this issue, notice collations contains 
multiple collation objects named the same:

 

"collations":{

      "collation":{

        "collationQuery":"haemorrhagic broken",

        "hits":36,

        "misspellingsAndCorrections":[

          "hemorrhagic","haemorrhagic",

          "braken","broken"]},

      "collation":{

        "collationQuery":"haemorrhagic brake",

        "hits":22,

        "misspellingsAndCorrections":[

          "hemorrhagic","haemorrhagic",

          "braken","brake"]},

      "collation":{

        "collationQuery":"hemorrhage broken",

        "hits":16,

        "misspellingsAndCorrections":[

          "hemorrhagic","hemorrhage",

          "braken","broken"]},

      "collation":{

        "collationQuery":"haemorrhagic braces",

        "hits":23,

        "misspellingsAndCorrections":[

          "hemorrhagic","haemorrhagic",

          "braken","braces"]},

      "collation":{

        "collationQuery":"hemorrhage brake",

        "hits":2,

        "misspellingsAndCorrections":[

          "hemorrhagic","hemorrhage",

          "braken","brake"]}

         }

     }

 

 

I’d appreciate any pointers with this. 

 

Z.

 

Reply via email to