Mailing List Archive

ruby/json response for spellcheck component

I'm working on a patch to support the new SpellCheckComponent in solr-ruby.
I see that the response in some cases has duplicate keys. Here is an



'collation','bul box'

When this is eval'd in Ruby, only the last instance of a duplicate key
(suggestion) makes it (maybe I'm completely missing something though) - Was
this the desired format and if so, anyone have any ideas on how to handle
this sort of thing? I'd vote for changing 'suggestion'=>{} to
'suggestions'=>[{},{}] etc..

Also, a possible gotcha for this format is... what if one of your terms was
'suggestion' or 'collation'? The spellcheck response fields are mixed right
in with the terms. What about having a separate key called 'terms':

'collation', 'bul box',
'buk', {'numFound'=>5, 'suggestions'=>[{},{}]},
'bot', {'numFound'=>5m 'suggestions'=>[{},{}]}