[ 
https://issues.apache.org/jira/browse/SOLR-3029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241289#comment-13241289
 ] 

James Dyer commented on SOLR-3029:
----------------------------------

Yonik,

I can answer some of your questions.  I do agree the spellcheck response format 
leaves something to be desired and maybe 4.0 is a good time to break backwards 
and improve it.

{quote}
Unless order is really important, "suggestions" should be a map
{quote}
I don't see why order would matter here, although some users might like to see 
the corrections listed in the order they appeared in the query.

{quote}
same for "collation"
{quote}
The collations are ranked, so order is important.

{quote}
and "misspellingsAndCorrections"
{quote}
The order shouldn't matter unless users are picky about the corrections being 
presented in the order they occur in the query.

{quote}
why is "collation" inside "suggestions" along with other words? should this be 
one level higher?
{quote}
This always confused me too.  I agree it should be one level higher.

{quote}
why isn't this giving me multiple collations
{quote}
This is a bug.  See SOLR-2853.

{quote}
why aren't multiple suggestions returned in misspellingsAndCorrections? (and 
what's the purpose ...?)
{quote}
This is nested with the Collation and gives details, for that particular 
collation, which misspelled word got which replacement.  This makes it easy for 
clients to generate messages like "no results found for abcdefgq ...  Showing 
abcdefgx instead!"  You can suppress this information by not specifying 
"spellcheck.collateExtendedResults=true".  For users (like me) who are 
interested in the collations only and don't care about individual-word 
corrections, it would be nice if we could suppress the first section of the 
response entirely.

{quote}
I briefly tried distributed search...
{quote}
DistributedSpellCheckComponentTest is supposed to detect problems like this but 
maybe something is going on and there is a bug this test isn't catching?

For what its worth you had voiced some misgivings about the JSON format when 
the multiple-collations feature was added.  At that time I supplied a quick 
patch to address your concerns.  I'm not sure if that patch fixes the problem 
described here.  See SOLR-2010 and your comment from Oct 16, 2010 and the (now 
outdated, never committed) patch I supplied on Oct 20.  

The patch on this issue causes multiple test failures although I didn't look 
into them.




                
> Poor json formatting of spelling collation info
> -----------------------------------------------
>
>                 Key: SOLR-3029
>                 URL: https://issues.apache.org/jira/browse/SOLR-3029
>             Project: Solr
>          Issue Type: Bug
>          Components: spellchecker
>    Affects Versions: 4.0
>            Reporter: Antony Stubbs
>            Priority: Blocker
>         Attachments: SOLR-3029.patch
>
>
> {noformat}
> "spellcheck": {
>     "suggestions": [
>     "dalllas",
>     {
> <snip>
>         {
>             "word": "canallas",
>             "freq": 1
>         }
>         ]
>     },
>     "correctlySpelled",
>     false,
>     "collation",
>     "dallas"
>     ]
> }
> {noformat}
> The correctlySpelled and collation key/values are stored as consecutive 
> elements in an array - quite odd. Is there a reason isn't not a key/value map 
> like most things?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to