You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2007/10/23 17:16:38 UTC

[Solr Wiki] Update of "RequestHandlerBase" by GrantIngersoll

Dear Wiki user,

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

The following page has been changed by GrantIngersoll:
http://wiki.apache.org/solr/RequestHandlerBase

New page:
The [http://lucene.apache.org/solr/api/org/apache/solr/handler/RequestHandlerBase.html RequestHandlerBase] is an abstract implementation of the SolrRequestHandler and provides basic functionality for those wishing to implement the SolrRequestHandler

[[TableOfContents(3)]]

== Initialization ==

The [http://lucene.apache.org/solr/api/org/apache/solr/handler/RequestHandlerBase.html#init(org.apache.solr.common.util.NamedList) init(NamedList)] method handles the initialization of three SolrParams objects:

 1. defaults - Contains the default settings for any parameters that this RequestHandler needs to operate.  
 1. appends - Appends the values in the config to any values passed in via the query
 1. invariants - Locks down the options available to Solr clients

== Request Processing ==
The [http://lucene.apache.org/solr/api/org/apache/solr/handler/RequestHandlerBase.html#handleRequest(org.apache.solr.request.SolrQueryRequest,%20org.apache.solr.request.SolrQueryResponse) handleRequest(...)] method sets up the SolrParams based on the incoming request, the defaults, appends and invariants by using the [http://lucene.apache.org/solr/api/org/apache/solr/util/SolrPluginUtils.html#setDefaults(org.apache.solr.request.SolrQueryRequest,%20org.apache.solr.common.params.SolrParams,%20org.apache.solr.common.params.SolrParams,%20org.apache.solr.common.params.SolrParams) setDefaults(...)] method to set the parameters.  It then calls the abstract handleRequestBody() method to hand off control to the implementation.  Various metrics are also collected.