You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2010/11/28 14:24:38 UTC
[jira] Updated: (SOLR-2257) DirectSolrSpellCheckerTest fails on ibm
jdk
[ https://issues.apache.org/jira/browse/SOLR-2257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated SOLR-2257:
------------------------------
Attachment: SOLR-2257.patch
This is actually a bug! Thanks for finding this Shai.
The problem is the comparators used in spellcheck are broken: this doesn't just affect the DirectSpellChecker but also the PlainText and Index-based spellchecks.
For example, if you use the SuggestWordScoreComparator (i think this one is the default), it first sorts based on score, then on document frequency if there is a tie. but if *both of these are a tie* the results are undefined... it depends on things such as which order you added documents to your index (for the index-based case)!!!!
This patch adds a tertiary tie-breaker, which is guaranteed to make the result stable, by using term text (String.compareTo) in these situations.
> DirectSolrSpellCheckerTest fails on ibm jdk
> -------------------------------------------
>
> Key: SOLR-2257
> URL: https://issues.apache.org/jira/browse/SOLR-2257
> Project: Solr
> Issue Type: Bug
> Components: spellchecker
> Affects Versions: 3.1, 4.0
> Reporter: Robert Muir
> Attachments: SOLR-2257.patch
>
>
> ant test-core -Dtestcase=DirectSolrSpellCheckerTest -Dtestmethod=test -Dtests.seed=-5961771858397647762:5582908231778462012 -Dtests.codec=randomPerField
> Seems to be specific to IBM JDK... won't fail on others:
> {noformat}
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled)
> J9VM - 20080415_018762_lHdSMr
> JIT - r9_20080415_1520
> GC - 20080415_AA)
> JCL - 20080412_01
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org