lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-2556) Spellcheck component not returned with numeric queries
Date Thu, 14 Jun 2012 01:13:42 GMT

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

Hoss Man commented on SOLR-2556:
--------------------------------

when i read this issue, i assumed it was simply a matter of the spellcheck response block
not being included if there was no suggestions, but it's more subtle then that.

These queries don't produce any spellcheck section in the response at all...

* http://localhost:8983/solr/spell?debugQuery=true&q=1&spellcheck=true&spellcheck.collate=true&spellcheck.build=true
* http://localhost:8983/solr/spell?debugQuery=true&q=9999&spellcheck=true&spellcheck.collate=true&spellcheck.build=true

But these queries do (even if that section contains no suggestions)....

* http://localhost:8983/solr/spell?debugQuery=true&q=______&spellcheck=true&spellcheck.collate=true&spellcheck.build=true
* http://localhost:8983/solr/spell?debugQuery=true&q=asfasdfasdfasdfasdf&spellcheck=true&spellcheck.collate=true&spellcheck.build=true
* http://localhost:8983/solr/spell?debugQuery=true&spellcheck.q=9999&q=9999&spellcheck=true&spellcheck.collate=true&spellcheck.build=true

Note in particular that last one - using "spellcheck.q=9999" causes the empty section to appear,
even if it's identical to "q=9999"

Skimming the code, the problem seems to relate to the user of the "queryConverter", and the
fact that it's only used on the "q" param (a different code path is used on the "spellcheck.q"
param) and what happens if no tokens are produced -- the "spellcheck" block is added to the
response inside a conditional block that is only executed if there are tokens.

It seems like it would be fairly easy to just move the code that adds the block to the response
outside of the conditional -- but the fact that the two code paths produce different behavior
makes me wonder if this isn't semi-intentional?  is the idea that "your query converter produced
no tokens, therefore we assume you don't want any spellcheck results?"  should it be?

(FWIW: there is a similar condition where no "spellcheck" response is generated if there are
no dictionaries configured)

                
> Spellcheck component not returned with numeric queries
> ------------------------------------------------------
>
>                 Key: SOLR-2556
>                 URL: https://issues.apache.org/jira/browse/SOLR-2556
>             Project: Solr
>          Issue Type: Bug
>          Components: spellchecker
>    Affects Versions: 3.1
>            Reporter: Markus Jelsma
>             Fix For: 4.0
>
>
> The spell check component's output is not written when sending queries that 
> consist of numbers only. Clients depending on the availability of the 
> spellcheck output need to check if the output is actually there.
> See also:
> http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201105.mbox/%3C201105301607.41956.markus.jelsma@openindex.io%3E

--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message