Solr
  1. Solr
  2. SOLR-2253

Solr should be able to keep on truckin' if a shard fails during a distributed search

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 1.4.1
    • Fix Version/s: 4.0-ALPHA
    • Component/s: search
    • Labels:
      None
    • Environment:

      All

      Description

      Solr 1.4.x currently abandons searches if a shard fails during a distributed search. A trivial patch to the SearchHandler class would allow the user to tell Solr to "keep on trucking" in these cases. Solr can indicate that the search response is "partial" via existing response header conventions, as well as include details about which shard failed.

      1. SOLR-2253.patch
        4 kB
        Rich Cariens

        Issue Links

          Activity

          Rich Cariens created issue -
          Hide
          Rich Cariens added a comment - - edited

          I've attached a patch for the following classes:

          org.apache.solr.handler.component.SearchHandler
          org.apache.solr.common.params.CommonParams

          and the example search request handler configuration:

          example/solr/conf/solrconfig.xml

          To see this patch in action, apply it at the solr root and run "ant example". Then follow the distributed search example instructions (http://wiki.apache.org/solr/DistributedSearch#Distributed_Search_Example) to get two Solr instances running locally. Run the curl command to search across both instances. Stop the instance that's listening on port 7574 and re-run the curl command. You will get a search response containing a header that reports you've got partial results, as well as which shard failed.

          Show
          Rich Cariens added a comment - - edited I've attached a patch for the following classes: org.apache.solr.handler.component.SearchHandler org.apache.solr.common.params.CommonParams and the example search request handler configuration: example/solr/conf/solrconfig.xml To see this patch in action, apply it at the solr root and run "ant example". Then follow the distributed search example instructions ( http://wiki.apache.org/solr/DistributedSearch#Distributed_Search_Example ) to get two Solr instances running locally. Run the curl command to search across both instances. Stop the instance that's listening on port 7574 and re-run the curl command. You will get a search response containing a header that reports you've got partial results, as well as which shard failed.
          Rich Cariens made changes -
          Field Original Value New Value
          Attachment SOLR-2253.patch [ 12460465 ]
          Hide
          Lance Norskog added a comment -
          Show
          Lance Norskog added a comment - SOLR-1143 We've already been around the block on this one Thanks for your enthusiasm!
          Hide
          Tommaso Teofili added a comment -

          I think we can mark this one as duplicate of SOLR-1143

          Show
          Tommaso Teofili added a comment - I think we can mark this one as duplicate of SOLR-1143
          Tommaso Teofili made changes -
          Link This issue duplicates SOLR-1143 [ SOLR-1143 ]
          Tommaso Teofili made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 4.0 [ 12314992 ]
          Resolution Duplicate [ 3 ]
          Uwe Schindler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Rich Cariens
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development