SOLR-7984: wrong and misleading error message 'no default request handler is registered'

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1700840 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2015-09-02 15:13:27 +00:00
parent 387c7d2077
commit 21bd68a443
2 changed files with 4 additions and 3 deletions

View File

@ -190,6 +190,8 @@ Bug Fixes
* SOLR-8004: RuleBasedAuthorization plugin does not work for the collection-admin-edit permission (noble)
* SOLR-7984: wrong and misleading error message 'no default request handler is registered' (noble, hossman)
Optimizations
----------------------

View File

@ -130,12 +130,11 @@ public final class RequestHandlers {
handlers.init(Collections.emptyMap(),core, modifiedInfos);
handlers.alias(handlers.getDefault(), "");
log.info("Registered paths: {}" , StrUtils.join(new ArrayList<>(handlers.keySet()) , ',' ));
if(!handlers.alias( "/select","")){
if(!handlers.alias( "standard","")){
if (handlers.get("") == null && !handlers.alias("/select", "")) {
if (handlers.get("") == null && !handlers.alias("standard", "")) {
log.warn("no default request handler is registered (either '/select' or 'standard')");
}
}
}
private PluginInfo applyInitParams(SolrConfig config, PluginInfo info) {