mirror of https://github.com/apache/lucene.git
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:
parent
6346b91b75
commit
76b494593d
|
@ -214,7 +214,33 @@ Apache Lucene trunk
|
||||||
Apache Tika 0.8
|
Apache Tika 0.8
|
||||||
Carrot2 3.4.2
|
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 ==================
|
================== 3.1.0-dev ==================
|
||||||
Versions of Major Components
|
Versions of Major Components
|
||||||
|
|
|
@ -17,18 +17,6 @@
|
||||||
|
|
||||||
package org.apache.solr.core;
|
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.net.URL;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -36,6 +24,21 @@ import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
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 {
|
final class RequestHandlers {
|
||||||
|
@ -68,6 +71,18 @@ final class RequestHandlers {
|
||||||
|
|
||||||
public RequestHandlers(SolrCore core) {
|
public RequestHandlers(SolrCore core) {
|
||||||
this.core = 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue