You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2016/03/11 14:17:55 UTC

lucene-solr git commit: SOLR-8029: bug fixes

Repository: lucene-solr
Updated Branches:
  refs/heads/apiv2 a9b8176fa -> b1b1e97cf


SOLR-8029: bug fixes


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b1b1e97c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b1b1e97c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b1b1e97c

Branch: refs/heads/apiv2
Commit: b1b1e97cf2e1665cd00d4e655b77216fb0415682
Parents: a9b8176
Author: Noble Paul <no...@apache.org>
Authored: Fri Mar 11 18:47:40 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Fri Mar 11 18:47:40 2016 +0530

----------------------------------------------------------------------
 solr/core/src/java/org/apache/solr/api/V2HttpCall.java  |  2 +-
 .../apache/solr/handler/admin/CollectionHandlerApi.java |  6 +++---
 .../apispec/collections.collection.shards.Commands.json |  1 -
 .../collections.collection.shards.shard.Commands.json   |  1 -
 .../collections.collection.shards.shard.delete.json     | 12 ++++++++++++
 ...ctions.collection.shards.shard.replica.Commands.json |  1 -
 6 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b1b1e97c/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
index da39920..9b09c12 100644
--- a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
+++ b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
@@ -238,7 +238,7 @@ public class V2HttpCall extends HttpSolrCall {
   }
 
   private static Api getSubPathImpl(final Map<String, Set<String>> subpaths, String path) {
-    return new Api(Map2.EMPTY) {
+    return new Api (Map2.EMPTY) {
       @Override
       public void call(SolrQueryRequest req, SolrQueryResponse rsp) {
         rsp.add("msg", "Invalid path, try the following");

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b1b1e97c/solr/core/src/java/org/apache/solr/handler/admin/CollectionHandlerApi.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CollectionHandlerApi.java b/solr/core/src/java/org/apache/solr/handler/admin/CollectionHandlerApi.java
index 6702f4c..cf8bfdb 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CollectionHandlerApi.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CollectionHandlerApi.java
@@ -69,7 +69,7 @@ public class CollectionHandlerApi extends BaseHandlerApiSupport {
 
   enum Cmd implements ApiCommand<CollectionHandlerApi> {
     GET_COLLECTIONS(EndPoint.COLLECTIONS, GET, LIST_OP),
-    GET_A_COLLECTION(EndPoint.PER_COLLECTION, GET, CLUSTERSTATUS_OP),
+    GET_A_COLLECTION(EndPoint.COLLECTION_STATE, GET, CLUSTERSTATUS_OP),
     CREATE_COLLECTION(EndPoint.COLLECTIONS_COMMANDS,
         POST,
         CREATE_OP,
@@ -139,11 +139,10 @@ public class CollectionHandlerApi extends BaseHandlerApiSupport {
         "split",
         ImmutableMap.of(
             "split.key", "splitKey")),
-    DELETE_SHARD(EndPoint.PER_COLLECTION_PER_SHARD_COMMANDS,
+    DELETE_SHARD(EndPoint.PER_COLLECTION_PER_SHARD_DELETE,
         DELETE,
         DELETESHARD_OP),
 
-
     CREATE_REPLICA(EndPoint.PER_COLLECTION_PER_SHARD_COMMANDS,
         POST,
         ADDREPLICA_OP,
@@ -232,6 +231,7 @@ public class CollectionHandlerApi extends BaseHandlerApiSupport {
     PER_COLLECTION_DELETE("collections.collection.delete"),
     PER_COLLECTION_SHARDS_COMMANDS("collections.collection.shards.Commands"),
     PER_COLLECTION_PER_SHARD_COMMANDS("collections.collection.shards.shard.Commands"),
+    PER_COLLECTION_PER_SHARD_DELETE("collections.collection.shards.shard.delete"),
     PER_COLLECTION_PER_SHARD_PER_REPLICA_COMMANDS("collections.collection.shards.shard.replica.Commands"),
     PER_COLLECTION_PER_SHARD_PER_REPLICA_DELETE("collections.collection.shards.shard.replica.delete");
     final String specName;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b1b1e97c/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.Commands.json b/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
index 70d6e11..0c7e054 100644
--- a/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
+++ b/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
@@ -1,7 +1,6 @@
 {
   "documentation": "https://cwiki.apache.org",
   "methods": [
-    "GET",
     "POST"
   ],
   "url": {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b1b1e97c/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json b/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
index 4b42c47..40275d7 100644
--- a/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
+++ b/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
@@ -2,7 +2,6 @@
   "documentation": "https://cwiki.apache.org",
   "methods": [
     "POST",
-    "GET",
     "DELETE"
   ],
   "url": {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b1b1e97c/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json b/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json
new file mode 100644
index 0000000..11dc291
--- /dev/null
+++ b/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json
@@ -0,0 +1,12 @@
+{
+  "documentation": "https://cwiki.apache.org",
+  "methods": [
+    "DELETE"
+  ],
+  "url": {
+    "paths": [
+      "/collections/{collection}/shards/{shard}",
+      "/c/{collection}/shards/{shard}"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b1b1e97c/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.Commands.json b/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.Commands.json
index dc747ac..67d36df 100644
--- a/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.Commands.json
+++ b/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.Commands.json
@@ -1,7 +1,6 @@
 {
   "documentation": "https://cwiki.apache.org",
   "methods": [
-    "GET",
     "POST"
   ],
   "url": {