From a4cb46ce237e06db1808e7f25204ec1f1bddb000 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Fri, 18 Oct 2013 16:11:01 +0000 Subject: [PATCH] SOLR-5353: Allow CoreAdmin split to accept a single range only git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1533528 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/solr/handler/admin/CoreAdminHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java index a323da78198..44af0dfc633 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java @@ -236,8 +236,8 @@ public class CoreAdminHandler extends RequestHandlerBase { 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(rangesArr.length); for (String r : rangesArr) {