mirror of https://github.com/apache/lucene.git
SOLR-511: add getInitArgs to RequestHandlerBase
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@641702 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fe6debb2a5
commit
a8e6df6707
|
@ -41,6 +41,7 @@ public abstract class RequestHandlerBase implements SolrRequestHandler, SolrInfo
|
|||
// acceptable every million requests or so?
|
||||
long numRequests;
|
||||
long numErrors;
|
||||
protected NamedList initArgs = null;
|
||||
protected SolrParams defaults;
|
||||
protected SolrParams appends;
|
||||
protected SolrParams invariants;
|
||||
|
@ -92,6 +93,8 @@ public abstract class RequestHandlerBase implements SolrRequestHandler, SolrInfo
|
|||
* See also the example solrconfig.xml located in the Solr codebase (example/solr/conf).
|
||||
*/
|
||||
public void init(NamedList args) {
|
||||
initArgs = args;
|
||||
|
||||
// Copied from StandardRequestHandler
|
||||
if( args != null ) {
|
||||
Object o = args.get("defaults");
|
||||
|
@ -108,6 +111,10 @@ public abstract class RequestHandlerBase implements SolrRequestHandler, SolrInfo
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public NamedList getInitArgs() {
|
||||
return initArgs;
|
||||
}
|
||||
|
||||
public abstract void handleRequestBody( SolrQueryRequest req, SolrQueryResponse rsp ) throws Exception;
|
||||
|
||||
|
|
|
@ -54,13 +54,6 @@ public class SearchHandler extends RequestHandlerBase implements SolrCoreAware
|
|||
protected static Logger log = Logger.getLogger(SearchHandler.class.getName());
|
||||
|
||||
protected List<SearchComponent> components = null;
|
||||
protected NamedList initArgs = null;
|
||||
|
||||
@Override
|
||||
public void init(NamedList args) {
|
||||
super.init( args );
|
||||
initArgs = args;
|
||||
}
|
||||
|
||||
protected List<String> getDefaultComponets()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue