mirror of https://github.com/apache/lucene.git
SOLR-5987: Add "collection" to UpdateParams.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1587918 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
50e53475ef
commit
b0cdbe2242
|
@ -113,6 +113,7 @@ Other Changes
|
|||
|
||||
* SOLR-5474: Have a new mode for SolrJ to support stateFormat=2 (Noble Paul, Tim Potter)
|
||||
|
||||
* SOLR-5987: Add "collection" to UpdateParams. (Mark Miller, Greg Solovyev)
|
||||
|
||||
================== 4.8.0 ==================
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@ public class CloudSolrServer extends SolrServer {
|
|||
}
|
||||
}
|
||||
|
||||
String collection = nonRoutableParams.get("collection", defaultCollection);
|
||||
String collection = nonRoutableParams.get(UpdateParams.COLLECTION, defaultCollection);
|
||||
if (collection == null) {
|
||||
throw new SolrServerException("No collection param specified on request and no default collection has been set.");
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ public class CloudSolrServer extends SolrServer {
|
|||
theUrlList.add(zkStateReader.getBaseUrlForNodeName(liveNode));
|
||||
}
|
||||
} else {
|
||||
String collection = reqParams.get("collection", defaultCollection);
|
||||
String collection = reqParams.get(UpdateParams.COLLECTION, defaultCollection);
|
||||
|
||||
if (collection == null) {
|
||||
throw new SolrServerException(
|
||||
|
@ -771,7 +771,7 @@ public class CloudSolrServer extends SolrServer {
|
|||
if (nodes.put(node, nodeProps) == null) {
|
||||
if (!sendToLeaders || (sendToLeaders && coreNodeProps.isLeader())) {
|
||||
String url;
|
||||
if (reqParams.get("collection") == null) {
|
||||
if (reqParams.get(UpdateParams.COLLECTION) == null) {
|
||||
url = ZkCoreNodeProps.getCoreUrl(
|
||||
nodeProps.getStr(ZkStateReader.BASE_URL_PROP),
|
||||
defaultCollection);
|
||||
|
@ -781,7 +781,7 @@ public class CloudSolrServer extends SolrServer {
|
|||
urlList2.add(url);
|
||||
} else if (sendToLeaders) {
|
||||
String url;
|
||||
if (reqParams.get("collection") == null) {
|
||||
if (reqParams.get(UpdateParams.COLLECTION) == null) {
|
||||
url = ZkCoreNodeProps.getCoreUrl(
|
||||
nodeProps.getStr(ZkStateReader.BASE_URL_PROP),
|
||||
defaultCollection);
|
||||
|
|
|
@ -52,6 +52,8 @@ public interface UpdateParams
|
|||
/** Rollback update commands */
|
||||
public static String ROLLBACK = "rollback";
|
||||
|
||||
public static String COLLECTION = "collection";
|
||||
|
||||
/** Select the update processor chain to use. A RequestHandler may or may not respect this parameter */
|
||||
public static final String UPDATE_CHAIN = "update.chain";
|
||||
|
||||
|
|
Loading…
Reference in New Issue