You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2017/05/13 08:12:04 UTC

lucene-solr:master: SOLR-10405: v2 API introspect response contains multiple copies of the experimental format WARNING

Repository: lucene-solr
Updated Branches:
  refs/heads/master 4f93056ce -> 9fa04ecc9


SOLR-10405: v2 API introspect response contains multiple copies of the experimental format WARNING


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

Branch: refs/heads/master
Commit: 9fa04ecc9521d4528dc61a2447a199d9ce56a86a
Parents: 4f93056
Author: Cao Manh Dat <da...@apache.org>
Authored: Sat May 13 15:11:56 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Sat May 13 15:11:56 2017 +0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                             | 2 ++
 solr/core/src/java/org/apache/solr/api/ApiBag.java           | 2 --
 solr/core/src/java/org/apache/solr/api/V2HttpCall.java       | 2 ++
 .../test/org/apache/solr/handler/V2ApiIntegrationTest.java   | 8 ++++++++
 4 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9fa04ecc/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 26a4467..c5c41c2 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -105,6 +105,8 @@ Bug Fixes
 * SOLR-10411: v2 Collection API "modify" command specification's replicationFactor property is incorrectly typed as string, 
   should be integer (Cao Manh Dat)
 
+* SOLR-10405: v2 API introspect response contains multiple copies of the experimental format WARNING (Cao Manh Dat)
+
 Optimizations
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9fa04ecc/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 4ea8d0d..adff11b 100644
--- a/solr/core/src/java/org/apache/solr/api/ApiBag.java
+++ b/solr/core/src/java/org/apache/solr/api/ApiBag.java
@@ -37,7 +37,6 @@ import org.apache.solr.common.util.Utils;
 import org.apache.solr.common.util.ValidatingJsonMap;
 import org.apache.solr.core.PluginBag;
 import org.apache.solr.core.PluginInfo;
-import org.apache.solr.handler.RequestHandlerUtils;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.request.SolrRequestHandler;
 import org.apache.solr.response.SolrQueryResponse;
@@ -177,7 +176,6 @@ public class ApiBag {
       List l = (List) rsp.getValues().get("spec");
       if (l == null) rsp.getValues().add("spec", l = new ArrayList());
       l.add(result);
-      RequestHandlerUtils.addExperimentalFormatWarning(rsp);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9fa04ecc/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 fb4aa56..76cba9c 100644
--- a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
+++ b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
@@ -38,6 +38,7 @@ import org.apache.solr.common.util.ValidatingJsonMap;
 import org.apache.solr.core.CoreContainer;
 import org.apache.solr.core.PluginBag;
 import org.apache.solr.core.SolrCore;
+import org.apache.solr.handler.RequestHandlerUtils;
 import org.apache.solr.logging.MDCLoggingContext;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.request.SolrRequestHandler;
@@ -221,6 +222,7 @@ public class V2HttpCall extends HttpSolrCall {
               }
             }
           }
+          RequestHandlerUtils.addExperimentalFormatWarning(rsp);
         }
       });
       getSubPathApi(requestHandlers,path, fullPath, (CompositeApi) api);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9fa04ecc/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java b/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java
index e478b0c..57ab9fc 100644
--- a/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java
@@ -62,6 +62,14 @@ public class V2ApiIntegrationTest extends SolrCloudTestCase {
   }
 
   @Test
+  public void testSingleWarning() throws Exception {
+    NamedList resp = cluster.getSolrClient().request(
+        new V2Request.Builder("/c/"+COLL_NAME+"/_introspect").build());
+    List warnings = resp.getAll("WARNING");
+    assertEquals(1, warnings.size());
+  }
+
+  @Test
   public void testCollectionsApi() throws Exception {
     CloudSolrClient client = cluster.getSolrClient();
     Map result = resAsMap(client, new V2Request.Builder("/c/"+COLL_NAME+"/get/_introspect").build());