Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 41047409F for ; Mon, 6 Jun 2011 19:02:25 +0000 (UTC) Received: (qmail 47653 invoked by uid 500); 6 Jun 2011 19:02:23 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 47577 invoked by uid 500); 6 Jun 2011 19:02:23 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 47570 invoked by uid 99); 6 Jun 2011 19:02:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2011 19:02:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2011 19:02:21 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 85EC610430C for ; Mon, 6 Jun 2011 19:02:00 +0000 (UTC) Date: Mon, 6 Jun 2011 19:02:00 +0000 (UTC) From: "Robert Muir (JIRA)" To: dev@lucene.apache.org Message-ID: <477949534.1452.1307386920545.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <743035037.60726.1306957187668.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SOLR-2571) IndexBasedSpellChecker "thresholdTokenFrequency" fails with a ClassCastException on startup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-2571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045031#comment-13045031 ] Robert Muir commented on SOLR-2571: ----------------------------------- {quote} 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? {quote} 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... {noformat} 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); {noformat} > IndexBasedSpellChecker "thresholdTokenFrequency" fails with a ClassCastException on startup > ------------------------------------------------------------------------------------------- > > Key: SOLR-2571 > URL: https://issues.apache.org/jira/browse/SOLR-2571 > 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: 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