[ https://issues.apache.org/jira/browse/SOLR-1143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747619#action_12747619 ]
Grant Ingersoll commented on SOLR-1143: --------------------------------------- I'm not sure I'm following the changes in SearchHandler. AIUI, before, we check for ShardResponses via comm.takeCompletedOrError() and then process the error and check for an exception. If there is an exception, we throw it, essentially. In the new code, it is replaced by just take() which returns the response, null or an exception. We then iterate over the whole set of responses every time we enter the while (rb.outgoing...) loop. However, why wouldn't you just keep the existing takeCompletedOrError, check to see if that shard is an error and handle it. At the end of the loop it should be easy to determine if the number of requests sent equals the number received and then add the partial results indicator, and, potentially, indicate which shards failed. What am I not understanding? Basically, I don't get the need for: {code} for (ShardResponse shardRsp : srsp.getShardRequest().responses) ... {code} > Return partial results when a connection to a shard is refused > -------------------------------------------------------------- > > Key: SOLR-1143 > URL: https://issues.apache.org/jira/browse/SOLR-1143 > Project: Solr > Issue Type: Improvement > Components: search > Reporter: Nicolas Dessaigne > Assignee: Grant Ingersoll > Fix For: 1.4 > > Attachments: SOLR-1143-2.patch, SOLR-1143-3.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 (https://issues.apache.org/jira/browse/SOLR-502), we > set the parameter "partialResults" at true. > This patch also adresses a problem expressed in the mailing list about a year > ago > (http://www.nabble.com/partialResults,-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.