lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martijn van Groningen (JIRA)" <>
Subject [jira] Updated: (SOLR-1143) Return partial results when a connection to a shard is refused
Date Sun, 16 Aug 2009 15:48:14 GMT


Martijn van Groningen updated SOLR-1143:

    Attachment: SOLR-1143-2.patch

I have added a test in _TestDistributedSearch_ class. This test sets up a cluster of shards
and then kills one shard and then it expects that the search request as a whole to continue.
The _TestDistributedSearch_ class in general tests distributed search by having a non distributed
instance and a cluster of shards both have the same documents. All results from the cluster
are compared with results from the non distributed instance. Some things in the test I added
like facets and maxScore could not be tested because one shard in the cluster is down (so
part of the corpus is missing). Only the documents that are returned from the shards are compared
against the documents in the non distributed instance.

I have also included the option to disable / enable partial results as Lance described. I
agree with Lance that ignoring a  shard failure should *not* be enabled by default, if you
do not know about this feature then finding the cause of the actual problem might be difficult.

In this patch you return a partial result when a shard has failed by setting _partialResults_
to _true_ in the request or if you want it to for all requests your can add _<bool name="return-partial-results">true</bool>_
 to your search handler in your solrconfig.xml. If both are not specified, partial results
are disabled. Currently the _partialResults_ parameter overrides the _return-partial-results_
property in the search handler.

> Return partial results when a connection to a shard is refused
> --------------------------------------------------------------
>                 Key: SOLR-1143
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Nicolas Dessaigne
>             Fix For: 1.4
>         Attachments: SOLR-1143-2.patch, SOLR-1143.patch
> If any shard is down in a distributed search, a ConnectException it thrown.
> Here's a little patch that change this behaviour: if we can't connect to a shard (ConnectException),
we get partial results from the active shards. As for TimeOut parameter (,
we set the parameter "partialResults" at true.
> This patch also adresses a problem expressed in the mailing list about a year ago (,-distributed-search---SOLR-502-td19002610.html)
> We have a use case that needs this behaviour and we would like to know your thougths
about such a behaviour? Should it be the default behaviour for distributed search?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message