Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 86140 invoked from network); 3 Apr 2006 05:19:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Apr 2006 05:19:48 -0000 Received: (qmail 471 invoked by uid 500); 3 Apr 2006 05:19:40 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 442 invoked by uid 500); 3 Apr 2006 05:19:39 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 423 invoked by uid 99); 3 Apr 2006 05:19:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Apr 2006 22:19:39 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [195.121.6.175] (HELO hnexfe09.hetnet.nl) (195.121.6.175) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Apr 2006 22:19:37 -0700 Received: from [192.168.0.100] ([86.85.154.64]) by hnexfe09.hetnet.nl with Microsoft SMTPSVC(5.0.2195.6874); Mon, 3 Apr 2006 07:19:14 +0200 In-Reply-To: References: <20060331222008.73666.qmail@web37404.mail.mud.yahoo.com> Mime-Version: 1.0 (Apple Message framework v746.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3E9D2366-5D0C-471A-A176-F92D957C83BB@snigel.net> Cc: java-dev@lucene.apache.org Content-Transfer-Encoding: 7bit From: karl wettin Subject: Re: Spellchecker bug (or feature?) Date: Mon, 3 Apr 2006 07:21:32 +0200 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.746.3) X-OriginalArrivalTime: 03 Apr 2006 05:19:14.0126 (UTC) FILETIME=[25A9EEE0:01C656DE] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 1 apr 2006 kl. 03.13 skrev karl wettin: > > 1 apr 2006 kl. 00.20 skrev Xiaocheng Luan: > >> Not sure if this is the right place to report this issue: >> >> The accuracy value, which can be set via setAccuracy(), is being >> modified in SpellChecker.java when a word is checked. As a result, >> the "min" may be pushed >> very high and will not suggest anything for later requests. >> >> One workaround would be to call setAccuracy() each time before a >> word is checked, I'm not sure if this is a feature (intended >> behavior) or a bug. >> By the way, I'm using spellchecker 1.9.1 that comes with Lucene >> 1.9.1. > > Ah, excellent timing. I just posted about that on the Jira as a > side note to my spell check refactor. > > http://issues.apache.org/jira/browse/LUCENE-537?page=all It is most definitely a bug. And here is the quite simple fix: public Suggestion[] suggestSimilar(String word, int numOfSuggestions.... float min = this.min; // allows manipulation of accuracy within method. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org