mirror of https://github.com/apache/lucene.git
SOLR-5679: SOLR-5679: Shard splitting fails with ClassCastException on collections upgraded from 4.5 and earlier versions
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1562872 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d5a8bdd767
commit
968d6f98cc
|
@ -238,6 +238,8 @@ Bug Fixes
|
|||
* SOLR-5230: Call DelegatingCollector.finish() during grouping.
|
||||
(Joel Bernstein, ehatcher)
|
||||
|
||||
* SOLR-5679: Shard splitting fails with ClassCastException on collections
|
||||
upgraded from 4.5 and earlier versions. (Brett Hoerner, shalin)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
|
|
@ -295,9 +295,10 @@ public class CoreAdminHandler extends RequestHandlerBase {
|
|||
DocRouter.Range currentRange = slice.getRange();
|
||||
ranges = currentRange != null ? router.partitionRange(partitions, currentRange) : null;
|
||||
}
|
||||
Map m = (Map) collection.get(DOC_ROUTER);
|
||||
if (m != null) {
|
||||
routeFieldName = (String) m.get("field");
|
||||
Object routerObj = collection.get(DOC_ROUTER); // for back-compat with Solr 4.4
|
||||
if (routerObj != null && routerObj instanceof Map) {
|
||||
Map routerProps = (Map) routerObj;
|
||||
routeFieldName = (String) routerProps.get("field");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue