You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2014/04/16 16:35:27 UTC
svn commit: r1587927 - in /lucene/dev/branches/branch_4x: ./ solr/
solr/CHANGES.txt solr/solrj/
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
solr/solrj/src/java/org/apache/solr/common/params/UpdateParams.java
Author: markrmiller
Date: Wed Apr 16 14:35:27 2014
New Revision: 1587927
URL: http://svn.apache.org/r1587927
Log:
SOLR-5987: Add "collection" to UpdateParams.
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_4x/solr/solrj/ (props changed)
lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/params/UpdateParams.java
Modified: lucene/dev/branches/branch_4x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/CHANGES.txt?rev=1587927&r1=1587926&r2=1587927&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Wed Apr 16 14:35:27 2014
@@ -51,6 +51,8 @@ Other Changes
* SOLR-5980: AbstractFullDistribZkTestBase#compareResults always returns false
for shouldFail. (Mark Miller, Gregory Chanan)
+* SOLR-5987: Add "collection" to UpdateParams. (Mark Miller, Greg Solovyev)
+
================== 4.8.0 ==================
Versions of Major Components
Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java?rev=1587927&r1=1587926&r2=1587927&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java (original)
+++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java Wed Apr 16 14:35:27 2014
@@ -278,7 +278,7 @@ public class CloudSolrServer extends Sol
}
}
- 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.");
}
@@ -529,7 +529,7 @@ public class CloudSolrServer extends Sol
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(
@@ -579,7 +579,7 @@ public class CloudSolrServer extends Sol
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);
@@ -589,7 +589,7 @@ public class CloudSolrServer extends Sol
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);
Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/params/UpdateParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/params/UpdateParams.java?rev=1587927&r1=1587926&r2=1587927&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/params/UpdateParams.java (original)
+++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/params/UpdateParams.java Wed Apr 16 14:35:27 2014
@@ -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";