You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "James Dyer (JIRA)" <ji...@apache.org> on 2013/01/07 16:58:12 UTC

[jira] [Commented] (SOLR-4278) Spellchecker correctlySpelled flag is improperly false in many cases

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

James Dyer commented on SOLR-4278:
----------------------------------

The semantics of the "correctlySpelled" flag, depend on whether or not "maxResultsForSuggest" is specified.  If this is omitted entirely, then the legacy behavior (pre-4.0) prevails.  Generally, this means if at least 1 word was not in the dictionary, then it is "false", otherwise "true".  This is regardless of the # of hits you receive.  If "maxResultsForSuggest=n" is specified, then when receiving n or more hits, it is set to "true", otherwise "false".  (See http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.maxResultsForSuggest and SOLR-2585).

When you take in account that some users are doing straight Boolean queries with mm=100% while others have low mm values and expect that some user keywords will not match anything, then the whole idea of declaring a query "correctlySpelled" or not black-and-white.

I could see a possible enhancement being to be able to specify a percentage for "maxResultsForSuggest".  "This query is correctly spelled if the hit count total at least 1/1000% or the documents in the index", or something like that.
                
> Spellchecker correctlySpelled flag is improperly false in many cases
> --------------------------------------------------------------------
>
>                 Key: SOLR-4278
>                 URL: https://issues.apache.org/jira/browse/SOLR-4278
>             Project: Solr
>          Issue Type: Bug
>          Components: spellchecker
>            Reporter: Jack Krupansky
>
> I issued a request to the /spell request handler with no misspellings, but the response still have a value of "false" for the "correctlySpelled" flag.
> Using the Solr 4.0 example, I added some mini documents:
> {code}
> curl http://localhost:8983/solr/update?commit=true -H 'Content-type:application/csv' -d '
> id,name
> spel-1,aardvark abacus ball bill cat cello
> spel-2,abate accord band bell cattle check
> spel-3,adorn border clean clock'
> {code}
> Then I issued this request to the /spell handler:
> {code}
> curl "http://localhost:8983/solr/spell/?q=abate&indent=true"
> {code}
> The response indicates that no corrections were needed, but the "correctlySpelled" flag is "false" when it should be "true".
> {code}
> <lst name="spellcheck">
>   <lst name="suggestions">
>     <bool name="correctlySpelled">false</bool>
>   </lst>
> </lst>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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