[
https://issues.apache.org/jira/browse/SOLR-9663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15588852#comment-15588852
]
Alan Woodward commented on SOLR-9663:
-------------------------------------
I think this is due to the annoying name mismatch between shard-level
parameters and collection-level ones. I'm working on the ForceLeader tests as
part of SOLR-9132, I'll fix this at the same time.
> CollectionAdminRequest.ShardSpecificAdminRequest constructor doesn't use
> collection or shard
> --------------------------------------------------------------------------------------------
>
> Key: SOLR-9663
> URL: https://issues.apache.org/jira/browse/SOLR-9663
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Joseph Ford
> Assignee: Alan Woodward
> Priority: Minor
>
> I am trying to create a CollectionAdminRequest.ForceLeader:
> {code}
> ForceLeader forceLeader =
> CollectionAdminRequest.forceLeaderElection(collection, shard);
> {code}
> But when I do this, I get an exception:
> "You must call setCollectionName() on this request"
> Instead, I have to do this:
> {code}
> ForceLeader forceLeader =
> CollectionAdminRequest.forceLeaderElection(collection, shard);
> forceLeader.setCollectionName(collection);
> forceLeader.setShardName(shard);
> {code}
> I believe the fix might be to change the CollectionAdminRequest constructor
> to use the abstract setters defined in the same class.
> https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.2.1/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java#L235
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]