lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "WritingDistributedSearchComponents" by BensonMargulies
Date Tue, 10 Apr 2012 18:37:17 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "WritingDistributedSearchComponents" page has been changed by BensonMargulies:
http://wiki.apache.org/solr/WritingDistributedSearchComponents?action=diff&rev1=11&rev2=12

Comment:
improve structure of new mateial

   1. [[http://lucene.apache.org/solr/api/org/apache/solr/handler/component/SearchComponent.html#modifyRequest(org.apache.solr.handler.component.ResponseBuilder,%20org.apache.solr.handler.component.SearchComponent,%20org.apache.solr.handler.component.ShardRequest)|modifyRequest]]
   1. [[http://lucene.apache.org/solr/api/org/apache/solr/handler/component/SearchComponent.html#handleResponses(org.apache.solr.handler.component.ResponseBuilder,%20org.apache.solr.handler.component.ShardRequest)|handleResponses]]
   1. [[http://lucene.apache.org/solr/api/org/apache/solr/handler/component/SearchComponent.html#finishStage(org.apache.solr.handler.component.ResponseBuilder)|finishStage]]
+ 
+ The distributed search process takes the place of the process() API to the !SearchComponent.
The !SearchHandler first calls the prepare() functions on all of the components. If a component
needs to act differently in prepare() in the distributed case, it can check RequestBuilder.isDistrib.
This boolean will be true for a request that is about to be distributed. (Also, params contains
ShardParams.SHARDS at top level here.) The prepare() and perform() API will be called out
on the shards to perform each shard's worth of the query.
+ 
  
  There are 4 stages to distributed search:
   1. Start (ResponseBuilder.STAGE_START)
@@ -28, +31 @@

            1. For each component, handle the responses
       1. For each component, call finishStage() 
  In this process, each !ShardRequest then goes off to it's Shard just as if it were a normal
request of that server.
- 
- = Distributed Search in Context =
- 
- The overall flow of control in the search handler is:
- 
-  1. The leader calls prepare() method for each component. At the time of this call, RequestBuilder.isDistrib
is true. If the component does not want to take any action on the leader, it should return
based on this flag. (Also, params contains ShardParams.SHARDS at top level here.)
- 
-  1. Run the distributedProcessing algorithm described above.
- 
- Note, then, that the leader calls prepare() is called for both distributed and non-distributed
requests, but perform() is only called for non-distributed requests. Perform() is only called
out on the shards.
- 
  
  = Testing =
  

Mime
View raw message