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/06/12 03:46:45 UTC

lucene-solr:master: SOLR-10715: Welcome message should work for _introspect

Repository: lucene-solr
Updated Branches:
  refs/heads/master 6075956b6 -> 41d12df6d


SOLR-10715: Welcome message should work for _introspect


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

Branch: refs/heads/master
Commit: 41d12df6d247b678b1a24c26567a08c2135b68ce
Parents: 6075956
Author: Cao Manh Dat <da...@apache.org>
Authored: Mon Jun 12 10:46:38 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Mon Jun 12 10:46:38 2017 +0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                                 | 2 ++
 solr/core/src/java/org/apache/solr/api/V2HttpCall.java           | 2 +-
 .../src/test/org/apache/solr/handler/V2ApiIntegrationTest.java   | 4 ++++
 solr/core/src/test/org/apache/solr/handler/V2StandaloneTest.java | 4 ++++
 4 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/41d12df6/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 275710d..6eb2152 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -156,6 +156,8 @@ Bug Fixes
 
 * SOLR-10223: Allow running examples as root on Linux with -force option (janhoy)
 
+* SOLR-10715: /v2/ should not be an alias for /v2/collections (Cao Manh Dat)
+
 Optimizations
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/41d12df6/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 da2781e..5e7c0b1 100644
--- a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
+++ b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
@@ -79,7 +79,7 @@ public class V2HttpCall extends HttpSolrCall {
     String fullPath = path = path.substring(7);//strip off '/____v2'
     try {
       pieces = getPathSegments(path);
-      if (pieces.size() == 0) {
+      if (pieces.size() == 0 || (pieces.size() == 1 && path.endsWith(CommonParams.INTROSPECT))) {
         api = new Api(null) {
           @Override
           public void call(SolrQueryRequest req, SolrQueryResponse rsp) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/41d12df6/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 4741ef4..66f5dbe 100644
--- a/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/V2ApiIntegrationTest.java
@@ -57,6 +57,10 @@ public class V2ApiIntegrationTest extends SolrCloudTestCase {
         new V2Request.Builder("").build());
     NamedList header = (NamedList) res.get("responseHeader");
     assertEquals(0, header.get("status"));
+
+    res = cluster.getSolrClient().request(new V2Request.Builder("/_introspect").build());
+    header = (NamedList) res.get("responseHeader");
+    assertEquals(0, header.get("status"));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/41d12df6/solr/core/src/test/org/apache/solr/handler/V2StandaloneTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/V2StandaloneTest.java b/solr/core/src/test/org/apache/solr/handler/V2StandaloneTest.java
index 2d5b2a9..ccf2a58 100644
--- a/solr/core/src/test/org/apache/solr/handler/V2StandaloneTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/V2StandaloneTest.java
@@ -42,6 +42,10 @@ public class V2StandaloneTest extends SolrTestCaseJ4{
       NamedList res = client.request(new V2Request.Builder("/").build());
       NamedList header = (NamedList) res.get("responseHeader");
       assertEquals(0, header.get("status"));
+
+      res = client.request(new V2Request.Builder("/_introspect").build());
+      header = (NamedList) res.get("responseHeader");
+      assertEquals(0, header.get("status"));
     }
 
     jetty.stop();