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/04/01 14:23:22 UTC

lucene-solr:apiv2: SOLR-8029: error output should be in json. spec for create command fixed

Repository: lucene-solr
Updated Branches:
  refs/heads/apiv2 ba5dc7503 -> 31126e888


SOLR-8029: error output should be in json. spec for create command fixed


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

Branch: refs/heads/apiv2
Commit: 31126e888a319742a153196ef3547c25b966524f
Parents: ba5dc75
Author: Noble Paul <no...@apache.org>
Authored: Fri Apr 1 17:53:04 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Fri Apr 1 17:53:04 2016 +0530

----------------------------------------------------------------------
 solr/core/src/java/org/apache/solr/api/Api.java              | 2 +-
 solr/core/src/java/org/apache/solr/api/ApiBag.java           | 4 ++--
 solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java | 2 +-
 solr/core/src/resources/apispec/collections.Commands.json    | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/31126e88/solr/core/src/java/org/apache/solr/api/Api.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/api/Api.java b/solr/core/src/java/org/apache/solr/api/Api.java
index 384a829..96b9316 100644
--- a/solr/core/src/java/org/apache/solr/api/Api.java
+++ b/solr/core/src/java/org/apache/solr/api/Api.java
@@ -40,7 +40,7 @@ public abstract class Api implements SpecProvider {
         if(commandSchema == null) {
           Map2 commands = getSpec().getMap("commands", null);
           commandSchema = commands != null ?
-              ImmutableMap.copyOf(ApiBag.getPartsedSchema(commands)) :
+              ImmutableMap.copyOf(ApiBag.getParsedSchema(commands)) :
               ImmutableMap.of();
         }
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/31126e88/solr/core/src/java/org/apache/solr/api/ApiBag.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/api/ApiBag.java b/solr/core/src/java/org/apache/solr/api/ApiBag.java
index 64c247a..90362f5 100644
--- a/solr/core/src/java/org/apache/solr/api/ApiBag.java
+++ b/solr/core/src/java/org/apache/solr/api/ApiBag.java
@@ -151,7 +151,7 @@ public class ApiBag {
       }
     };
   }
-  public static Map<String, JsonSchemaValidator> getPartsedSchema(Map2 commands) {
+  public static Map<String, JsonSchemaValidator> getParsedSchema(Map2 commands) {
     Map<String,JsonSchemaValidator> validators =  new HashMap<>();
     for (Object o : commands.entrySet()) {
       Map.Entry cmd = (Map.Entry) o;
@@ -168,7 +168,7 @@ public class ApiBag {
   private void verifyCommands(Map2 spec) {
     Map2 commands = spec.getMap("commands", null);
     if (commands == null) return;
-    getPartsedSchema(commands);
+    getParsedSchema(commands);
 
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/31126e88/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
index 44cf5a9..8573c99 100644
--- a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
+++ b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
@@ -649,7 +649,7 @@ public class HttpSolrCall {
         solrReq = new SolrQueryRequestBase(core, solrParams) {
         };
       }
-      QueryResponseWriter writer = core.getQueryResponseWriter(solrReq);
+      QueryResponseWriter writer = getResponseWriter()/* core.getQueryResponseWriter(solrReq)*/;
       writeResponse(solrResp, writer, Method.GET);
     } catch (Exception e) { // This error really does not matter
       exp = e;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/31126e88/solr/core/src/resources/apispec/collections.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.Commands.json b/solr/core/src/resources/apispec/collections.Commands.json
index 753e961..a2cbe81 100644
--- a/solr/core/src/resources/apispec/collections.Commands.json
+++ b/solr/core/src/resources/apispec/collections.Commands.json
@@ -48,7 +48,7 @@
           "description": "A comma separated list of shard names, e.g., shard-x,shard-y,shard-z . This is a required parameter when using the 'implicit' router."
         },
         "replicationFactor": {
-          "type": "string",
+          "type": "number",
           "description": "The number of replicas to be created for each shard."
         },
         "createNodeSet": {