lucene-dev mailing list archives

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


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&
* http://localhost:8983/solr/spell?debugQuery=true&q=9999&spellcheck=true&spellcheck.collate=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&
* http://localhost:8983/solr/spell?debugQuery=true&q=asfasdfasdfasdfasdf&spellcheck=true&spellcheck.collate=true&
* http://localhost:8983/solr/spell?debugQuery=true&spellcheck.q=9999&q=9999&spellcheck=true&spellcheck.collate=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:
>             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:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message