You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Arnold Bronley <ar...@gmail.com> on 2018/01/24 22:32:49 UTC

Spellcheck collations results

 Hi,

in a spellchecker call, if I don't get back collations object in the
response, is it correct to assume that even if I create a query myself by
joining the individually spell-corrected words in suggestions object in
response, it will have 0 results?

E.g. In the following spellchecker response

for query : here lise the grate mighty king

"spellcheck": {
    "suggestions": [
      "lise",
      {
        "numFound": 7,
        "startOffset": 0,
        "endOffset": 11,
        "origFreq": 0,
        "suggestion": [
          {
            "word": "lies",
            "freq": 550
          }        ]
      },
      "grate",
      {
        "numFound": 2,
        "startOffset": 15,
        "endOffset": 19,
        "origFreq": 778,
        "suggestion": [
          {
            "word": "great",
            "freq": 1580
          }
        ]
      } ]
      }
    ],
    "correctlySpelled": false,
    "collations": []
  }

There are no collation results returned. So if one decides to reconstruct
the correct query by taking help of individually corrected words in
suggestions object, is it reasonable to assume that such a corrected query
(In this case it will be 'here lies the great king') will still return 0
results?because there were no collations returned?

Re: Spellcheck collations results

Posted by Alessandro Benedetti <a....@sease.io>.
Given this configurations you may state that if no collation is returned
there was no collation returning results after :
- getting back a maximum of 7 corrections for mispelled terms
- getting a max of 10.000 combinations of collations to extendedResults
- test 3 collations against the index to check if results are returned and
then give up

So there are scenarios where you don't get the collation, but it actually
would have returned results :

- the collation involve a correction that was not included in the closest 7
collations
- the collation was not tested ( not being included in the first 3 collation
combinations)

We can go more in deep if required, the Spellcheck is quite a complex module
:)

Cheers



-----
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Spellcheck collations results

Posted by Arnold Bronley <ar...@gmail.com>.
Thanks for replying Alessandro.

I am passing these parameters:

q=polt&spellcheck.q=polt&wt=json&indent=true&spellcheck=true&spellcheck.count=7&spellcheck.onlyMorePopular=true&spellcheck.extendedResults=true&spellcheck.collate=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=3&spellcheck.collateExtendedResults=true&spellcheck.accuracy=0.72





On Thu, Jan 25, 2018 at 4:28 AM, alessandro.benedetti <a....@sease.io>
wrote:

> Can you tell us the request parameters used for the spellcheck ?
>
> In particular are you using these ? (from the wiki) :
>
> " The *spellcheck.maxCollationTries* Parameter
> This parameter specifies the number of collation possibilities for Solr to
> try before giving up. Lower values ensure better performance. Higher values
> may be necessary to find a collation that can return results. The default
> value is 0, which maintains backwards-compatible (Solr 1.4) behavior (do
> not
> check collations). This parameter is ignored if spellcheck.collate is
> false.
>
> The *spellcheck.maxCollationEvaluations* Parameter
> This parameter specifies the maximum number of word correction combinations
> to rank and evaluate prior to deciding which collation candidates to test
> against the index. This is a performance safety-net in case a user enters a
> query with many misspelled words. The default is 10,000 combinations, which
> should work well in most situations. "
>
> Regards
>
>
>
>
>
> -----
> ---------------
> Alessandro Benedetti
> Search Consultant, R&D Software Engineer, Director
> Sease Ltd. - www.sease.io
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>

Re: Spellcheck collations results

Posted by "alessandro.benedetti" <a....@sease.io>.
Can you tell us the request parameters used for the spellcheck ?

In particular are you using these ? (from the wiki) :

" The *spellcheck.maxCollationTries* Parameter
This parameter specifies the number of collation possibilities for Solr to
try before giving up. Lower values ensure better performance. Higher values
may be necessary to find a collation that can return results. The default
value is 0, which maintains backwards-compatible (Solr 1.4) behavior (do not
check collations). This parameter is ignored if spellcheck.collate is false.

The *spellcheck.maxCollationEvaluations* Parameter
This parameter specifies the maximum number of word correction combinations
to rank and evaluate prior to deciding which collation candidates to test
against the index. This is a performance safety-net in case a user enters a
query with many misspelled words. The default is 10,000 combinations, which
should work well in most situations. "

Regards





-----
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html