diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 21c28d78961..3c211ae9d2f 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -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 diff --git a/solr/src/java/org/apache/solr/core/RequestHandlers.java b/solr/src/java/org/apache/solr/core/RequestHandlers.java index ddd6b3aa8f4..ef672625269 100644 --- a/solr/src/java/org/apache/solr/core/RequestHandlers.java +++ b/solr/src/java/org/apache/solr/core/RequestHandlers.java @@ -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; } /**