lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Dyer (Updated) (JIRA)" <>
Subject [jira] [Updated] (SOLR-2848) DirectSolrSpellChecker fails in distributed environment
Date Wed, 09 Nov 2011 17:59:51 GMT


James Dyer updated SOLR-2848:

    Attachment: SOLR-2848-refactoring.patch

Here is a version that addresses Robert's concerns.

I'd really like for a specific spellchecker impl to be able to able to work with the default
merge implementation etc without having 'boolean sharded' (it shouldnt have to "know"). What
is this extra check doing, and can we move it to the base class?

What happens is the first stage of a distributed request needs to return the original tokens
plus an empty list so that the master, when merging, can know that the shard found the token
misspelled but had no suggestions.  But if this is not a shard request, we don't want to go
sending empty lists back to the enduser.  Hence the "isShard" boolean.  I removed this, allowing
it to return empty lists all the time, and then having them removed out of the response if
it is a non-distributed scenario.  This invalidated some test scenarios, so I made adjustments
to a few unit tests to cope.

Let me know if this needs more work before committing.
> DirectSolrSpellChecker fails in distributed environment
> -------------------------------------------------------
>                 Key: SOLR-2848
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud, spellchecker
>    Affects Versions: 4.0
>            Reporter: James Dyer
>            Priority: Minor
>             Fix For: 4.0
>         Attachments: SOLR-2848-refactoring.patch, SOLR-2848-refactoring.patch, SOLR-2848.patch,
> While working on SOLR-2585, it was brought to my attention that DirectSolrSpellChecker
has no test coverage involving a distributed environment.  Here I am adding a random element
to DistributedSpellCheckComponentTest to alternate between the "IndexBased" and "Direct" spell
checkers.  Doing so revealed bugs in using DirectSolrSpellChecker in a distributed environment.
 The fixes here roughly mirror those made to the "IndexBased" spell checker with SOLR-2083.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message