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 GrantIngersoll
Date Thu, 02 Sep 2010 18:55:49 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 GrantIngersoll.
http://wiki.apache.org/solr/WritingDistributedSearchComponents?action=diff&rev1=6&rev2=7

--------------------------------------------------

  = Basics =
+ 
+ /!\ Note: Best efforts are being made to make this reliable, but please consider it a work
in progress. /!\ 
  
  A Distributed !SearchComponent is a !SearchComponent that overrides one or more of the following
methods:
   1. [[http://lucene.apache.org/solr/api/org/apache/solr/handler/component/SearchComponent.html#distributedProcess(org.apache.solr.handler.component.ResponseBuilder)|distributedProcess]]
@@ -19, +21 @@

  The basic distributed algorithm (which is a different path from the non-distributed), as
implemented in [[http://lucene.apache.org/solr/api/org/apache/solr/handler/component/SearchHandler|SearchHandler]]
is:
   1. while not at STAGE_DONE
       1. For each Component invoke distributedProcess to see if it has anything it wants
to distribute.  If it does, it will return one of the 4 stages and setup a !ShardRequest and
add it to a queue
+           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. 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.
  
- For those wondering, 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.  /!\ :TODO: /!\ CONFIRM THIS.
+ 
  
  = Testing =
  

Mime
View raw message