mirror of https://github.com/apache/lucene.git
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
This commit is contained in:
parent
e6f237d4c3
commit
a4cb46ce23
|
@ -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<DocRouter.Range>(rangesArr.length);
|
||||
for (String r : rangesArr) {
|
||||
|
|
Loading…
Reference in New Issue