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 12:40:35 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=9&rev2=10

- = Distributed Search in Context = 
- 
- 
  
  = Basics =
  
@@ -28, +25 @@

            1. modifyRequest() can be used to refine other shard requests, instead of sending
a separate !ShardRequest.  See the [[http://lucene.apache.org/solr/api/org/apache/solr/handler/component/FacetComponent|FacetComponent]]
for an example.  This is likely best done by calling ResponseBuilder.addRequest() which will
then invoke the modifyRequest() method on each of the components.
            1. Components can also indicate the purpose of their request by using the ShardRequest.PURPOSE_*
fields.  When set, these fields can then be inspected by the other components to see if it
is a purpose they are interested in.
       1. While we have outgoing !ShardRequest instances
-           1. Submit the requests to the shards
+           1. Submit the requests to the shards. The QT for these requests will be null (the
default) unless the original query, or one of the components, set the the ShardParams.SHARDS_QT
parameter to something else. There appears to be no way to use a custom URL for the shard
queries.
            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 =
  
- /!\ :TODO: /!\ 
+ org.apache.solr.BaseDistributedSearchTestCase provides test support for distributed components.
It compares the results of distributed and non-distributed queries.
  
  = Classes to Know =
  
@@ -46, +52 @@

  Key distributed member variables are:
   1. shards - The address of the shards, not including http://
   1. stage - What stage this response is in, out of the 5 stages specified above.
+  1. isDistrib - true in the distribution algorithm, false out on the shards.
  
  == ShardRequest ==
  /!\ :TODO: /!\ 

Mime
View raw message