mirror of https://github.com/apache/lucene.git
SOLR-4221: make new solrj client/router able to read old clusterstate
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1526244 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b1524738f3
commit
7df5169ef4
|
@ -51,7 +51,12 @@ public abstract class DocRouter {
|
|||
|
||||
protected String getRouteField(DocCollection coll){
|
||||
if(coll == null) return null;
|
||||
Map m = (Map) coll.get(DOC_ROUTER);
|
||||
Object o = coll.get(DOC_ROUTER);
|
||||
if (o instanceof String) {
|
||||
return null;
|
||||
//old format. cannot have a routefield. Ignore it
|
||||
}
|
||||
Map m = (Map) o;
|
||||
if(m == null) return null;
|
||||
return (String) m.get("field");
|
||||
|
||||
|
|
Loading…
Reference in New Issue