[
https://issues.apache.org/jira/browse/SOLR-4682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13624346#comment-13624346
]
Shalin Shekhar Mangar commented on SOLR-4682:
---------------------------------------------
Jason, where is the code that you have put in the issue description? I see the
following in CoreAdminRequest on branch 4.2:
{code}
public static CoreAdminResponse mergeIndexes(String name,
String[] indexDirs, String[] srcCores, SolrServer server) throws
SolrServerException,
IOException {
CoreAdminRequest.MergeIndexes req = new CoreAdminRequest.MergeIndexes();
req.setCoreName(name);
req.setIndexDirs(Arrays.asList(indexDirs));
req.setSrcCores(Arrays.asList(srcCores));
return req.process(server);
}
{code}
> CoreAdminRequest.mergeIndexes can not merge mutilple cores.
> -----------------------------------------------------------
>
> Key: SOLR-4682
> URL: https://issues.apache.org/jira/browse/SOLR-4682
> Project: Solr
> Issue Type: Bug
> Components: clients - java
> Affects Versions: 4.2
> Environment: java version "1.6.0_20"
> Reporter: Jason.D.Cao
> Labels: patch
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The mergeIndexes method in CoreAdminRequest class accepts an array of
> srcCores, but it only handles the last element in srcCores array. Related
> code as follows,
> if (srcCores != null) {
> for (String srcCore : srcCores) {
> params.set(CoreAdminParams.SRC_CORE, srcCore);
> }
> }
> The for-each loop above just override the SRC_CORE value in params and only
> the last one reserved finally.
> We should remove the for-each loop and set SRC_CORE value with an array of
> srcCores.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]