lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] Updated: (SOLR-2257) DirectSolrSpellCheckerTest fails on ibm jdk
Date Sun, 28 Nov 2010 13:24:38 GMT


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:
>             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
> 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:
For additional commands, e-mail:

View raw message