SOLR-2445: Register standard search handler

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1086276 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Koji Sekiguchi 2011-03-28 15:39:10 +00:00
parent 6346b91b75
commit 76b494593d
2 changed files with 54 additions and 13 deletions

View File

@ -214,7 +214,33 @@ Apache Lucene trunk
Apache Tika 0.8
Carrot2 3.4.2
(No Changes)
Upgrading from Solr 3.1
----------------------
Detailed Change List
----------------------
New Features
----------------------
Optimizations
----------------------
Bug Fixes
----------------------
* SOLR-2445: Register "standard" search handler. (koji)
Other Changes
----------------------
Build
----------------------
Documentation
----------------------
================== 3.1.0-dev ==================
Versions of Major Components

View File

@ -17,18 +17,6 @@
package org.apache.solr.core;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrException.ErrorCode;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SimpleOrderedMap;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.request.SolrRequestHandler;
import org.apache.solr.response.SolrQueryResponse;
import org.apache.solr.util.plugin.SolrCoreAware;
import org.apache.solr.util.plugin.PluginInfoInitialized;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URL;
import java.util.Collections;
import java.util.HashMap;
@ -36,6 +24,21 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrException.ErrorCode;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.CommonParams.EchoParamStyle;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SimpleOrderedMap;
import org.apache.solr.handler.component.SearchHandler;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.request.SolrRequestHandler;
import org.apache.solr.response.SolrQueryResponse;
import org.apache.solr.util.plugin.PluginInfoInitialized;
import org.apache.solr.util.plugin.SolrCoreAware;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*/
final class RequestHandlers {
@ -68,6 +71,18 @@ final class RequestHandlers {
public RequestHandlers(SolrCore core) {
this.core = core;
register(DEFAULT_HANDLER_NAME, getStandardHandler());
}
private SolrRequestHandler getStandardHandler(){
SolrRequestHandler standard = core.createRequestHandler(SearchHandler.class.getName());
NamedList defParams = new NamedList();
defParams.add(CommonParams.HEADER_ECHO_PARAMS, EchoParamStyle.EXPLICIT.toString());
defParams.add(CommonParams.ROWS, 10);
NamedList nl = new NamedList();
nl.add("defaults", defParams);
standard.init(nl);
return standard;
}
/**