lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (SOLR-2571) IndexBasedSpellChecker "thresholdTokenFrequency" fails with a ClassCastException on startup
Date Mon, 06 Jun 2011 19:02:00 GMT


Robert Muir commented on SOLR-2571:

Possibly this isn't fully accurate but I'm at least mostly correct here. Seems like the discrepency
with DirectSolrSpellChecker is because it isn't returning Frequency info?

This sounds like a bug, care to open a separate issue on it? (we can resolve the int/float
stuff here on this one).

The thing certainly intends to return freq info...
SuggestWord[] suggestions = checker.suggestSimilar(new Term(field, token.toString()), 
          options.count, options.reader, options.onlyMorePopular, accuracy);
      for (SuggestWord suggestion : suggestions)
        result.add(token, suggestion.string, suggestion.freq);

> IndexBasedSpellChecker "thresholdTokenFrequency" fails with a ClassCastException on startup
> -------------------------------------------------------------------------------------------
>                 Key: SOLR-2571
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: spellchecker
>    Affects Versions: 1.4.1, 3.1, 4.0
>            Reporter: James Dyer
>            Priority: Minor
>              Labels: whereIsHossManWhenYouNeedHim
>             Fix For: 3.3, 4.0
>         Attachments: SOLR-2571.patch, SOLR-2571.patch, SOLR-2571.patch, SOLR-2571.solr3.2.patch
> When parsing the configuration for thresholdTokenFrequency", the IndexBasedSpellChecker
tries to pull a Float from the DataConfig.xml-derrived NamedList.  However, this comes through
as a String.  Therefore, a ClassCastException is always thrown whenever this parameter is
specified.  The code ought to be doing "Float.parseFloat(...)" on the value.
> This looks like a nice feature to use in cases the data contains misspelled or rare words
leading to spurious "correct" queries.  I would have liked to have used this with a project
we just completed however this bug prevented that.  This issue came up recently in the User's
mailing list so I am raising an issue now.

This message is automatically generated by JIRA.
For more information on JIRA, see:

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

View raw message