Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-2957: fix default core behavior when in zk mode

Mark Robert Miller18a1d4028356
diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
index 56c6d6585bb..4582e98d9db 100644
--- a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
+++ b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
@@ -184,9 +184,7 @@ public class SolrDispatchFilter implements Filter
}
}
if (core == null) {
- if (cores.isZooKeeperAware() && corename.length() == 0) {
- core = cores.getCore("");
- } else if (!cores.isZooKeeperAware()) {
+ if (!cores.isZooKeeperAware() ) {
core = cores.getCore("");
}
}
@@ -199,6 +197,9 @@ public class SolrDispatchFilter implements Filter
if (core != null) {
// we found a core, update the path
path = path.substring( idx );
+ } else {
+ // try the default core
+ core = cores.getCore("");
}
// TODO: if we couldn't find it locally, look on other nodes
}