lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r1533528 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
Date Fri, 18 Oct 2013 16:11:01 GMT
Author: shalin
Date: Fri Oct 18 16:11:01 2013
New Revision: 1533528

URL: http://svn.apache.org/r1533528
Log:
SOLR-5353: Allow CoreAdmin split to accept a single range only

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java?rev=1533528&r1=1533527&r2=1533528&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
(original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
Fri Oct 18 16:11:01 2013
@@ -236,8 +236,8 @@ public class CoreAdminHandler extends Re
     String rangesStr = params.get(CoreAdminParams.RANGES);    // ranges=a-b,c-d,e-f
     if (rangesStr != null)  {
       String[] rangesArr = rangesStr.split(",");
-      if (rangesArr.length == 0 || rangesArr.length == 1) {
-        throw new SolrException(ErrorCode.BAD_REQUEST, "There must be at least two ranges
specified to split an index");
+      if (rangesArr.length == 0) {
+        throw new SolrException(ErrorCode.BAD_REQUEST, "There must be at least one range
specified to split an index");
       } else  {
         ranges = new ArrayList<DocRouter.Range>(rangesArr.length);
         for (String r : rangesArr) {



Mime
View raw message