You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2017/06/28 21:22:57 UTC
[2/4] lucene-solr:master: SOLR-6807: requestDispatcher/@handleSelect
now defaults to false; stop using it. Deprecated StandardRequestHandler;
stop using it.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java b/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java
index bf7925a..35bd107 100644
--- a/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java
+++ b/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java
@@ -134,7 +134,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 2, 5 , args);
+ "/select", 2, 5 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=1] "
@@ -143,28 +143,28 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 3, 5 , args);
+ "/select", 3, 5 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=0]"
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 4, 5 , args);
+ "/select", 4, 5 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=0]"
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 25, 5 , args);
+ "/select", 25, 5 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=0]"
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 0, 1 , args);
+ "/select", 0, 1 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=1] "
@@ -172,7 +172,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 0, 2 , args);
+ "/select", 0, 2 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=2] "
@@ -180,7 +180,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 1, 1 , args);
+ "/select", 1, 1 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=1] "
@@ -188,28 +188,28 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 3, 1 , args);
+ "/select", 3, 1 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=0]"
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 4, 1 , args);
+ "/select", 4, 1 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=0]"
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 1, 0 , args);
+ "/select", 1, 0 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=0]"
);
args = new HashMap<>();
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z]",
- "standard", 0, 0 , args);
+ "/select", 0, 0 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=0]"
@@ -217,7 +217,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args = new HashMap<>();
args.put("defType","lucenePlusSort");
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z];val_s1 asc",
- "standard", 0, 0 , args);
+ "/select", 0, 0 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=0]"
@@ -225,7 +225,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args = new HashMap<>();
args.put("defType","lucenePlusSort");
req = new LocalSolrQueryRequest(h.getCore(), "val_s:[a TO z];val_s1 desc",
- "standard", 0, 0 , args);
+ "/select", 0, 0 , args);
assertQ(req
,"//*[@numFound='3'] "
,"*[count(//doc)=0]"
@@ -1109,7 +1109,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args = new HashMap<>();
args.put("fl","fname_s,arr_f ");
req = new LocalSolrQueryRequest(h.getCore(), "id:44",
- "standard", 0, 10, args);
+ "/select", 0, 10, args);
assertQ(req
,"//str[.='Yonik'] "
,"//float[.='1.4142135']"
@@ -1117,7 +1117,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args = new HashMap<>();
args.put("fl","fname_s,score");
req = new LocalSolrQueryRequest(h.getCore(), "id:44",
- "standard", 0, 10, args);
+ "/select", 0, 10, args);
assertQ(req
,"//str[.='Yonik']"
,"//float[@name='score' and . > 0]"
@@ -1128,7 +1128,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args = new HashMap<>();
args.put("fl","score,* ");
req = new LocalSolrQueryRequest(h.getCore(), "id:44",
- "standard", 0, 10, args);
+ "/select", 0, 10, args);
assertQ(req
,"//str[.='Yonik'] "
,"//float[.='1.4142135'] "
@@ -1138,7 +1138,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args = new HashMap<>();
args.put("fl","*,score ");
req = new LocalSolrQueryRequest(h.getCore(), "id:44",
- "standard", 0, 10, args);
+ "/select", 0, 10, args);
assertQ(req
,"//str[.='Yonik'] "
,"//float[.='1.4142135'] "
@@ -1148,7 +1148,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args = new HashMap<>();
args.put("fl","* ");
req = new LocalSolrQueryRequest(h.getCore(), "id:44",
- "standard", 0, 10, args);
+ "/select", 0, 10, args);
assertQ(req
,"//str[.='Yonik'] "
,"//float[.='1.4142135'] "
@@ -1160,7 +1160,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args = new HashMap<>();
args.put("fl","score ");
req = new LocalSolrQueryRequest(h.getCore(), "id:44",
- "standard", 0, 10, args);
+ "/select", 0, 10, args);
assertQ(req
,"//result[@maxScore>0]"
);
@@ -1168,7 +1168,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args.put("fl","score ");
args.put("defType","lucenePlusSort");
req = new LocalSolrQueryRequest(h.getCore(), "id:44;id desc;",
- "standard", 0, 10, args);
+ "/select", 0, 10, args);
assertQ(req
,"//result[@maxScore>0]"
);
@@ -1176,7 +1176,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args.put("fl","score ");
args.put("defType","lucenePlusSort");
req = new LocalSolrQueryRequest(h.getCore(), "id:44;",
- "standard", 0, 10, args);
+ "/select", 0, 10, args);
assertQ(req
,"//@maxScore = //doc/float[@name='score']"
);
@@ -1184,7 +1184,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args.put("fl","score ");
args.put("defType","lucenePlusSort");
req = new LocalSolrQueryRequest(h.getCore(), "id:44;id desc;",
- "standard", 0, 10, args);
+ "/select", 0, 10, args);
assertQ(req
,"//@maxScore = //doc/float[@name='score']"
);
@@ -1192,7 +1192,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
args.put("fl","*,score");
args.put("defType","lucenePlusSort");
req = new LocalSolrQueryRequest(h.getCore(), "id:44;id desc;",
- "standard", 0, 0 , args);
+ "/select", 0, 0 , args);
assertQ(req
,"//result[@maxScore>0]"
);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java
index bdeeb40..386f690 100644
--- a/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java
@@ -30,7 +30,7 @@ public class DisMaxRequestHandlerTest extends SolrTestCaseJ4 {
public static void beforeClass() throws Exception {
initCore("solrconfig.xml","schema.xml");
lrf = h.getRequestFactory
- ("dismax", 0, 20,
+ ("/dismax", 0, 20,
CommonParams.VERSION,"2.2",
"facet", "true",
"facet.field","t_s"
@@ -69,7 +69,7 @@ public class DisMaxRequestHandlerTest extends SolrTestCaseJ4 {
@Test
public void testSomeStuff() throws Exception {
- doTestSomeStuff("dismax");
+ doTestSomeStuff("/dismax");
}
public void doTestSomeStuff(final String qt) throws Exception {
@@ -179,7 +179,7 @@ public class DisMaxRequestHandlerTest extends SolrTestCaseJ4 {
Pattern p = Pattern.compile("subject:hell\\s*subject:cool");
Pattern p_bool = Pattern.compile("\\(subject:hell\\s*subject:cool\\)");
String resp = h.query(req("q", "cool stuff"
- ,"qt", "dismax"
+ ,"qt", "/dismax"
,CommonParams.VERSION, "2.2"
,"bq", "subject:hell OR subject:cool"
,CommonParams.DEBUG_QUERY, "true"
@@ -188,7 +188,7 @@ public class DisMaxRequestHandlerTest extends SolrTestCaseJ4 {
assertFalse(p_bool.matcher(resp).find());
resp = h.query(req("q", "cool stuff"
- ,"qt", "dismax"
+ ,"qt", "/dismax"
,CommonParams.VERSION, "2.2"
,"bq", "subject:hell OR subject:cool"
,"bq",""
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/EchoParamsTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/EchoParamsTest.java b/solr/core/src/test/org/apache/solr/EchoParamsTest.java
index a89a512..44699e8 100644
--- a/solr/core/src/test/org/apache/solr/EchoParamsTest.java
+++ b/solr/core/src/test/org/apache/solr/EchoParamsTest.java
@@ -66,7 +66,7 @@ public class EchoParamsTest extends SolrTestCaseJ4 {
private void allEchoParams() {
lrf = h.getRequestFactory
- ("crazy_custom_qt", 0, 20,
+ ("/crazy_custom_qt", 0, 20,
CommonParams.VERSION,"2.2",
"wt","xml",
"echoParams", "all",
@@ -74,7 +74,7 @@ public class EchoParamsTest extends SolrTestCaseJ4 {
);
assertQ(req("foo"),HEADER_XPATH + "/lst[@name='params']/str[@name='fl'][.='implicit']");
- assertQ(req("foo"),HEADER_XPATH + "/str[@name='handler'][.='org.apache.solr.handler.StandardRequestHandler']");
+ assertQ(req("foo"),HEADER_XPATH + "/str[@name='handler'][.='org.apache.solr.handler.component.SearchHandler']");
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/SampleTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/SampleTest.java b/solr/core/src/test/org/apache/solr/SampleTest.java
index 244272f..407a483 100644
--- a/solr/core/src/test/org/apache/solr/SampleTest.java
+++ b/solr/core/src/test/org/apache/solr/SampleTest.java
@@ -102,7 +102,7 @@ public class SampleTest extends SolrTestCaseJ4 {
* Note: the qt proves we are using our custom config...
*/
TestHarness.LocalRequestFactory l = h.getRequestFactory
- ("crazy_custom_qt",100,200,CommonParams.VERSION,"2.2");
+ ("/crazy_custom_qt",100,200,CommonParams.VERSION,"2.2");
assertQ("how did i find Mack Daddy? ",
l.makeRequest( "Mack Daddy" )
,"//result[@numFound=0]"
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/SolrInfoBeanTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/SolrInfoBeanTest.java b/solr/core/src/test/org/apache/solr/SolrInfoBeanTest.java
index d39c87f..72fdf25 100644
--- a/solr/core/src/test/org/apache/solr/SolrInfoBeanTest.java
+++ b/solr/core/src/test/org/apache/solr/SolrInfoBeanTest.java
@@ -18,9 +18,9 @@ package org.apache.solr;
import org.apache.lucene.util.TestUtil;
import org.apache.solr.core.SolrInfoBean;
-import org.apache.solr.handler.StandardRequestHandler;
import org.apache.solr.handler.admin.LukeRequestHandler;
import org.apache.solr.handler.component.SearchComponent;
+import org.apache.solr.handler.component.SearchHandler;
import org.apache.solr.highlight.DefaultSolrHighlighter;
import org.apache.solr.metrics.SolrMetricManager;
import org.apache.solr.metrics.SolrMetricProducer;
@@ -49,7 +49,7 @@ public class SolrInfoBeanTest extends SolrTestCaseJ4
*/
public void testCallMBeanInfo() throws Exception {
List<Class> classes = new ArrayList<>();
- classes.addAll(getClassesForPackage(StandardRequestHandler.class.getPackage().getName()));
+ classes.addAll(getClassesForPackage(SearchHandler.class.getPackage().getName()));
classes.addAll(getClassesForPackage(SearchComponent.class.getPackage().getName()));
classes.addAll(getClassesForPackage(LukeRequestHandler.class.getPackage().getName()));
classes.addAll(getClassesForPackage(DefaultSolrHighlighter.class.getPackage().getName()));
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/TestDistributedSearch.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java b/solr/core/src/test/org/apache/solr/TestDistributedSearch.java
index 9a821aa..02754f0 100644
--- a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java
+++ b/solr/core/src/test/org/apache/solr/TestDistributedSearch.java
@@ -386,7 +386,7 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {
query("q","*:*", "fl","n_*","sort",i1 + " desc");
// basic spellcheck testing
- query("q", "toyata", "fl", "id,lowerfilt", "spellcheck", true, "spellcheck.q", "toyata", "qt", "spellCheckCompRH_Direct", "shards.qt", "spellCheckCompRH_Direct");
+ query("q", "toyata", "fl", "id,lowerfilt", "spellcheck", true, "spellcheck.q", "toyata", "qt", "/spellCheckCompRH_Direct", "shards.qt", "/spellCheckCompRH_Direct");
stress=0; // turn off stress... we want to tex max combos in min time
for (int i=0; i<25*RANDOM_MULTIPLIER; i++) {
@@ -1012,8 +1012,8 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {
"q", "toyata",
"spellcheck", "true",
"spellcheck.q", "toyata",
- "qt", "spellCheckCompRH_Direct",
- "shards.qt", "spellCheckCompRH_Direct",
+ "qt", "/spellCheckCompRH_Direct",
+ "shards.qt", "/spellCheckCompRH_Direct",
ShardParams.SHARDS_INFO, "true",
ShardParams.SHARDS_TOLERANT, "true");
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java b/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java
index 7a9dbdb..79b49dc 100644
--- a/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java
@@ -58,7 +58,7 @@ public class BasicZkTest extends AbstractZkTestCase {
SolrCore core = h.getCore();
// test that we got the expected config, not just hardcoded defaults
- assertNotNull(core.getRequestHandler("mock"));
+ assertNotNull(core.getRequestHandler("/mock"));
lrf.args.put(CommonParams.VERSION, "2.2");
assertQ("test query on empty index", request("qlkciyopsbgzyvkylsjhchghjrdf"),
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java b/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java
index 30898b9..55cdee8 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java
@@ -108,7 +108,7 @@ public class TestRandomRequestDistribution extends AbstractFullDistribZkTestBase
SolrMetricManager metricManager = container.getMetricManager();
for (SolrCore core : container.getCores()) {
String registry = core.getCoreMetricManager().getRegistryName();
- Counter cnt = metricManager.counter(null, registry, "requests", "QUERY.standard");
+ Counter cnt = metricManager.counter(null, registry, "requests", "QUERY./select");
SolrRequestHandler select = core.getRequestHandler("");
// long c = (long) select.getStatistics().get("requests");
shardVsCount.put(core.getName(), (int) cnt.getCount());
@@ -188,7 +188,7 @@ public class TestRandomRequestDistribution extends AbstractFullDistribZkTestBase
SolrMetricManager leaderMetricManager = leaderCore.getCoreContainer().getMetricManager();
String leaderRegistry = leaderCore.getCoreMetricManager().getRegistryName();
- Counter cnt = leaderMetricManager.counter(null, leaderRegistry, "requests", "QUERY.standard");
+ Counter cnt = leaderMetricManager.counter(null, leaderRegistry, "requests", "QUERY./select");
// All queries should be served by the active replica
// To make sure that's true we keep querying the down replica
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java b/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java
index cf8d7c6..9bf08a5 100644
--- a/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java
+++ b/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java
@@ -37,7 +37,7 @@ public class AlternateDirectoryTest extends SolrTestCaseJ4 {
}
public void testAltDirectoryUsed() throws Exception {
- assertQ(req("q","*:*","qt","standard"));
+ assertQ(req("q","*:*","qt","/select"));
assertTrue(TestFSDirectoryFactory.openCalled);
assertTrue(TestIndexReaderFactory.newReaderCalled);
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/core/RequestHandlersTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/RequestHandlersTest.java b/solr/core/src/test/org/apache/solr/core/RequestHandlersTest.java
index 3c13645..637aa24 100644
--- a/solr/core/src/test/org/apache/solr/core/RequestHandlersTest.java
+++ b/solr/core/src/test/org/apache/solr/core/RequestHandlersTest.java
@@ -36,7 +36,7 @@ public class RequestHandlersTest extends SolrTestCaseJ4 {
public void testInitCount() {
String registry = h.getCore().getCoreMetricManager().getRegistryName();
SolrMetricManager manager = h.getCoreContainer().getMetricManager();
- Gauge<Number> g = (Gauge<Number>)manager.registry(registry).getMetrics().get("QUERY.mock.initCount");
+ Gauge<Number> g = (Gauge<Number>)manager.registry(registry).getMetrics().get("QUERY./mock.initCount");
assertEquals("Incorrect init count",
1, g.getValue().intValue());
}
@@ -52,7 +52,7 @@ public class RequestHandlersTest extends SolrTestCaseJ4 {
@Test
public void testLazyLoading() {
SolrCore core = h.getCore();
- PluginBag.PluginHolder<SolrRequestHandler> handler = core.getRequestHandlers().getRegistry().get("lazy");
+ PluginBag.PluginHolder<SolrRequestHandler> handler = core.getRequestHandlers().getRegistry().get("/lazy");
assertFalse(handler.isLoaded());
assertU(adoc("id", "42",
@@ -75,12 +75,12 @@ public class RequestHandlersTest extends SolrTestCaseJ4 {
// But it should behave just like the 'defaults' request handler above
assertQ("lazy handler returns fewer matches",
- req("q", "id:[42 TO 47]", "qt","lazy"),
+ req("q", "id:[42 TO 47]", "qt","/lazy"),
"*[count(//doc)=4]"
);
assertQ("lazy handler includes highlighting",
- req("q", "name:Zapp OR title:General", "qt","lazy"),
+ req("q", "name:Zapp OR title:General", "qt","/lazy"),
"//lst[@name='highlighting']"
);
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java b/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
index c042bd6..62f4d2e 100644
--- a/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
+++ b/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java
@@ -254,7 +254,7 @@ public class SolrCoreTest extends SolrTestCaseJ4 {
bean = infoRegistry.get(QueryComponent.COMPONENT_NAME);
assertNotNull("bean not registered", bean);
//try a Req Handler, which are stored by name, not clas
- bean = infoRegistry.get("standard");
+ bean = infoRegistry.get("/select");
assertNotNull("bean not registered", bean);
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/core/TestConfig.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/TestConfig.java b/solr/core/src/test/org/apache/solr/core/TestConfig.java
index 87a453f..5a7b706 100644
--- a/solr/core/src/test/org/apache/solr/core/TestConfig.java
+++ b/solr/core/src/test/org/apache/solr/core/TestConfig.java
@@ -69,8 +69,8 @@ public class TestConfig extends SolrTestCaseJ4 {
}
@Test
public void testDisableRequetsHandler() throws Exception {
- assertNull(h.getCore().getRequestHandler("disabled"));
- assertNotNull(h.getCore().getRequestHandler("enabled"));
+ assertNull(h.getCore().getRequestHandler("/disabled"));
+ assertNotNull(h.getCore().getRequestHandler("/enabled"));
}
@Test
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/core/TestQuerySenderListener.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/TestQuerySenderListener.java b/solr/core/src/test/org/apache/solr/core/TestQuerySenderListener.java
index c1eb873..900f024 100644
--- a/solr/core/src/test/org/apache/solr/core/TestQuerySenderListener.java
+++ b/solr/core/src/test/org/apache/solr/core/TestQuerySenderListener.java
@@ -75,7 +75,7 @@ public class TestQuerySenderListener extends SolrTestCaseJ4 {
RefCounted<SolrIndexSearcher> currentSearcherRef = core.getSearcher();
SolrIndexSearcher currentSearcher = currentSearcherRef.get();
qsl.newSearcher(currentSearcher, null);//test new Searcher
- MockQuerySenderListenerReqHandler mock = (MockQuerySenderListenerReqHandler) core.getRequestHandler("mock");
+ MockQuerySenderListenerReqHandler mock = (MockQuerySenderListenerReqHandler) core.getRequestHandler("/mock");
assertNotNull("Mock is null", mock);
String evt = mock.req.getParams().get(EventParams.EVENT);
assertNotNull("Event is null", evt);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java b/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java
index 425f04a..76ac7c3 100644
--- a/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java
+++ b/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java
@@ -70,7 +70,7 @@ public class TestQuerySenderNoQuery extends SolrTestCaseJ4 {
SolrIndexSearcher currentSearcher = currentSearcherRef.get();
SolrIndexSearcher dummy = null;
qsl.newSearcher(currentSearcher, dummy);//test first Searcher (since param is null)
- MockQuerySenderListenerReqHandler mock = (MockQuerySenderListenerReqHandler) core.getRequestHandler("mock");
+ MockQuerySenderListenerReqHandler mock = (MockQuerySenderListenerReqHandler) core.getRequestHandler("/mock");
assertNotNull("Mock is null", mock);
assertNull("Req (firstsearcher) is not null", mock.req);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java b/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java
index 529fa06..32be46e 100644
--- a/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java
+++ b/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java
@@ -52,7 +52,7 @@ public class TestXIncludeConfig extends AbstractSolrTestCase {
SolrCore core = h.getCore();
assertNotNull("includedHandler is null",
- core.getRequestHandler("includedHandler"));
+ core.getRequestHandler("/includedHandler"));
UpdateRequestProcessorChain chain
= core.getUpdateProcessingChain("special-include");
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/handler/MoreLikeThisHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/MoreLikeThisHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/MoreLikeThisHandlerTest.java
index 6da06b1..aa63ce3 100644
--- a/solr/core/src/test/org/apache/solr/handler/MoreLikeThisHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/MoreLikeThisHandlerTest.java
@@ -38,7 +38,6 @@ public class MoreLikeThisHandlerTest extends SolrTestCaseJ4 {
@BeforeClass
public static void moreLikeThisBeforeClass() throws Exception {
initCore("solrconfig.xml", "schema.xml");
- lrf = h.getRequestFactory("standard", 0, 20 );
}
@Test
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/handler/SearchHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/SearchHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/SearchHandlerTest.java
new file mode 100644
index 0000000..b35103b
--- /dev/null
+++ b/solr/core/src/test/org/apache/solr/handler/SearchHandlerTest.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.handler;
+
+import org.apache.solr.util.AbstractSolrTestCase;
+import org.junit.BeforeClass;
+
+/**
+ * Most of the tests for {@link org.apache.solr.handler.component.SearchHandler} are in {@link org.apache.solr.ConvertedLegacyTest}.
+ */
+public class SearchHandlerTest extends AbstractSolrTestCase {
+
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ initCore("solrconfig.xml", "schema.xml");
+ }
+
+ public void testSorting() throws Exception {
+ assertU(adoc("id", "10", "title", "test", "val_s1", "aaa"));
+ assertU(adoc("id", "11", "title", "test", "val_s1", "bbb"));
+ assertU(adoc("id", "12", "title", "test", "val_s1", "ccc"));
+ assertU(commit());
+
+ assertQ(req("q", "title:test")
+ ,"//*[@numFound='3']"
+ );
+
+ assertQ(req("q", "title:test", "sort","val_s1 asc")
+ ,"//*[@numFound='3']"
+ ,"//result/doc[1]/str[@name='id'][.='10']"
+ ,"//result/doc[2]/str[@name='id'][.='11']"
+ ,"//result/doc[3]/str[@name='id'][.='12']"
+ );
+
+ assertQ(req("q", "title:test", "sort","val_s1 desc")
+ ,"//*[@numFound='3']"
+ ,"//result/doc[1]/str[@name='id'][.='12']"
+ ,"//result/doc[2]/str[@name='id'][.='11']"
+ ,"//result/doc[3]/str[@name='id'][.='10']"
+ );
+
+ // Make sure score parsing works
+ assertQ(req("q", "title:test", "sort","score desc")
+ ,"//*[@numFound='3']"
+ );
+
+ assertQ(req("q", "title:test", "sort","score asc")
+ ,"//*[@numFound='3']"
+ );
+
+ // Using legacy ';' param
+ assertQ(req("q", "title:test; val_s1 desc", "defType","lucenePlusSort")
+ ,"//*[@numFound='3']"
+ ,"//result/doc[1]/str[@name='id'][.='12']"
+ ,"//result/doc[2]/str[@name='id'][.='11']"
+ ,"//result/doc[3]/str[@name='id'][.='10']"
+ );
+
+ assertQ(req("q", "title:test; val_s1 asc", "defType","lucenePlusSort")
+ ,"//*[@numFound='3']"
+ ,"//result/doc[1]/str[@name='id'][.='10']"
+ ,"//result/doc[2]/str[@name='id'][.='11']"
+ ,"//result/doc[3]/str[@name='id'][.='12']"
+ );
+ }
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/handler/StandardRequestHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/StandardRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/StandardRequestHandlerTest.java
deleted file mode 100644
index 668fefd..0000000
--- a/solr/core/src/test/org/apache/solr/handler/StandardRequestHandlerTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.handler;
-
-import org.apache.solr.core.SolrCore;
-import org.apache.solr.util.AbstractSolrTestCase;
-import org.junit.BeforeClass;
-
-/**
- * Most of the tests for StandardRequestHandler are in ConvertedLegacyTest
- *
- */
-public class StandardRequestHandlerTest extends AbstractSolrTestCase {
-
- @BeforeClass
- public static void beforeClass() throws Exception {
- initCore("solrconfig.xml", "schema.xml");
- }
-
- @Override public void setUp() throws Exception {
- super.setUp();
- lrf = h.getRequestFactory("standard", 0, 20 );
- }
-
- public void testSorting() throws Exception {
- SolrCore core = h.getCore();
- assertU(adoc("id", "10", "title", "test", "val_s1", "aaa"));
- assertU(adoc("id", "11", "title", "test", "val_s1", "bbb"));
- assertU(adoc("id", "12", "title", "test", "val_s1", "ccc"));
- assertU(commit());
-
- assertQ(req("q", "title:test")
- ,"//*[@numFound='3']"
- );
-
- assertQ(req("q", "title:test", "sort","val_s1 asc")
- ,"//*[@numFound='3']"
- ,"//result/doc[1]/str[@name='id'][.='10']"
- ,"//result/doc[2]/str[@name='id'][.='11']"
- ,"//result/doc[3]/str[@name='id'][.='12']"
- );
-
- assertQ(req("q", "title:test", "sort","val_s1 desc")
- ,"//*[@numFound='3']"
- ,"//result/doc[1]/str[@name='id'][.='12']"
- ,"//result/doc[2]/str[@name='id'][.='11']"
- ,"//result/doc[3]/str[@name='id'][.='10']"
- );
-
- // Make sure score parsing works
- assertQ(req("q", "title:test", "sort","score desc")
- ,"//*[@numFound='3']"
- );
-
- assertQ(req("q", "title:test", "sort","score asc")
- ,"//*[@numFound='3']"
- );
-
- // Using legacy ';' param
- assertQ(req("q", "title:test; val_s1 desc", "defType","lucenePlusSort")
- ,"//*[@numFound='3']"
- ,"//result/doc[1]/str[@name='id'][.='12']"
- ,"//result/doc[2]/str[@name='id'][.='11']"
- ,"//result/doc[3]/str[@name='id'][.='10']"
- );
-
- assertQ(req("q", "title:test; val_s1 asc", "defType","lucenePlusSort")
- ,"//*[@numFound='3']"
- ,"//result/doc[1]/str[@name='id'][.='10']"
- ,"//result/doc[2]/str[@name='id'][.='11']"
- ,"//result/doc[3]/str[@name='id'][.='12']"
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java
index 40e952a..9e84fd2 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java
@@ -124,11 +124,11 @@ public class DistributedSpellCheckComponentTest extends BaseDistributedSearchTes
handle.put("grouped", SKIP);
//Randomly select either IndexBasedSpellChecker or DirectSolrSpellChecker
- String requestHandlerName = "spellCheckCompRH_Direct";
- String reqHandlerWithWordbreak = "spellCheckWithWordbreak_Direct";
+ String requestHandlerName = "/spellCheckCompRH_Direct";
+ String reqHandlerWithWordbreak = "/spellCheckWithWordbreak_Direct";
if(random().nextBoolean()) {
- requestHandlerName = "spellCheckCompRH";
- reqHandlerWithWordbreak = "spellCheckWithWordbreak";
+ requestHandlerName = "/spellCheckCompRH";
+ reqHandlerWithWordbreak = "/spellCheckWithWordbreak";
}
//Shortcut names
@@ -143,7 +143,7 @@ public class DistributedSpellCheckComponentTest extends BaseDistributedSearchTes
String maxResults = SpellingParams.SPELLCHECK_MAX_RESULTS_FOR_SUGGEST;
//Build the dictionary for IndexBasedSpellChecker
- q(buildRequest("*:*", false, "spellCheckCompRH", false, build, "true"));
+ q(buildRequest("*:*", false, "/spellCheckCompRH", false, build, "true"));
//Test Basic Functionality
query(buildRequest("toyata", true, requestHandlerName, random().nextBoolean(), (String[]) null));
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/handler/component/FacetPivotSmallTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/component/FacetPivotSmallTest.java b/solr/core/src/test/org/apache/solr/handler/component/FacetPivotSmallTest.java
index 4b5e8a7..0f4ec06 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/FacetPivotSmallTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/FacetPivotSmallTest.java
@@ -40,7 +40,6 @@ public class FacetPivotSmallTest extends SolrTestCaseJ4 {
super.setUp();
clearIndex();
assertU(commit());
- lrf = h.getRequestFactory("standard", 0, 20);
}
/**
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/handler/component/ResponseLogComponentTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/component/ResponseLogComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/ResponseLogComponentTest.java
index 7e309fc..cf657da 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/ResponseLogComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/ResponseLogComponentTest.java
@@ -38,8 +38,8 @@ public class ResponseLogComponentTest extends SolrTestCaseJ4 {
public void testToLogIds() throws Exception {
SolrQueryRequest req = null;
try {
- String handler="withlog";
- req = req("indent","true", "qt","withlog", "q","aa", "rows","2",
+ String handler="/withlog";
+ req = req("indent","true", "qt","/withlog", "q","aa", "rows","2",
"fl","id,subject", "responseLog","true");
SolrQueryResponse qr = h.queryAndResponse(handler, req);
NamedList<Object> entries = qr.getToLog();
@@ -55,8 +55,8 @@ public class ResponseLogComponentTest extends SolrTestCaseJ4 {
public void testToLogScores() throws Exception {
SolrQueryRequest req = null;
try {
- String handler="withlog";
- req = req("indent","true", "qt","withlog", "q","aa", "rows","2",
+ String handler="/withlog";
+ req = req("indent","true", "qt","/withlog", "q","aa", "rows","2",
"fl","id,subject,score", "responseLog","true");
SolrQueryResponse qr = h.queryAndResponse(handler, req);
NamedList<Object> entries = qr.getToLog();
@@ -72,8 +72,8 @@ public class ResponseLogComponentTest extends SolrTestCaseJ4 {
public void testDisabling() throws Exception {
SolrQueryRequest req = null;
try {
- String handler="withlog";
- req = req("indent","true", "qt","withlog", "q","aa", "rows","2",
+ String handler="/withlog";
+ req = req("indent","true", "qt","/withlog", "q","aa", "rows","2",
"fl","id,subject", "responseLog","false");
SolrQueryResponse qr = h.queryAndResponse(handler, req);
NamedList<Object> entries = qr.getToLog();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java
index 37d02d9..d3b0828 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java
@@ -43,7 +43,7 @@ import org.junit.Test;
@Slow
@SuppressTempFileChecks(bugUrl = "https://issues.apache.org/jira/browse/SOLR-1877 Spellcheck IndexReader leak bug?")
public class SpellCheckComponentTest extends SolrTestCaseJ4 {
- static String rh = "spellCheckCompRH";
+ static String rh = "/spellCheckCompRH";
@BeforeClass
@@ -254,7 +254,7 @@ public class SpellCheckComponentTest extends SolrTestCaseJ4 {
public void testReloadOnStart() throws Exception {
assertU(adoc("id", "0", "lowerfilt", "This is a title"));
assertU(commit());
- SolrQueryRequest request = req("qt", "spellCheckCompRH", "q", "*:*",
+ SolrQueryRequest request = req("qt", "/spellCheckCompRH", "q", "*:*",
"spellcheck.q", "ttle", "spellcheck", "true", "spellcheck.dictionary",
"default", "spellcheck.build", "true");
assertQ(request, "//arr[@name='suggestion'][.='title']");
@@ -271,7 +271,7 @@ public class SpellCheckComponentTest extends SolrTestCaseJ4 {
checker.init(args);
checker.inform(h.getCore());
- request = req("qt", "spellCheckCompRH", "q", "*:*", "spellcheck.q", "ttle",
+ request = req("qt", "/spellCheckCompRH", "q", "*:*", "spellcheck.q", "ttle",
"spellcheck", "true", "spellcheck.dictionary", "default",
"spellcheck.reload", "true");
List<SearchComponent> components = new ArrayList<>();
@@ -293,7 +293,7 @@ public class SpellCheckComponentTest extends SolrTestCaseJ4 {
@SuppressWarnings("unchecked")
@Test
public void testRebuildOnCommit() throws Exception {
- SolrQueryRequest req = req("q", "lowerfilt:lucenejavt", "qt", "spellCheckCompRH", "spellcheck", "true");
+ SolrQueryRequest req = req("q", "lowerfilt:lucenejavt", "qt", "/spellCheckCompRH", "spellcheck", "true");
String response = h.query(req);
assertFalse("No suggestions should be returned", response.contains("lucenejava"));
@@ -330,7 +330,7 @@ public class SpellCheckComponentTest extends SolrTestCaseJ4 {
params.add(SpellingParams.SPELLCHECK_EXTENDED_RESULTS,"true");
params.add(CommonParams.Q, "anotheq");
- SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+ SolrRequestHandler handler = core.getRequestHandler("/spellCheckCompRH");
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
index 3bb4974..cee1ab5 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
@@ -78,7 +78,6 @@ public class StatsComponentTest extends AbstractSolrTestCase {
super.setUp();
clearIndex();
assertU(commit());
- lrf = h.getRequestFactory("standard", 0, 20);
}
public void testStats() throws Exception {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java
index ed7a9e7..b15e167 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java
@@ -516,7 +516,7 @@ public class SuggestComponentTest extends SolrTestCaseJ4 {
waitForWarming();
}
- assertQ(req("qt", "standard",
+ assertQ(req("qt", "/select",
"q", "*:*"),
"//*[@numFound='11']"
);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java
index abee4bd..91a5869 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java
@@ -118,7 +118,7 @@ public class TermVectorComponentTest extends SolrTestCaseJ4 {
assertNull(h.validateUpdate(commit()));
}
- static String tv = "tvrh";
+ static String tv = "/tvrh";
@Test
public void testBasics() throws Exception {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java b/solr/core/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java
index aafe3f5..99868a7 100644
--- a/solr/core/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java
+++ b/solr/core/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java
@@ -77,7 +77,7 @@ public class FastVectorHighlighterTest extends SolrTestCaseJ4 {
args.put("hl.method", "fastVector"); // the new way
}
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard",0,200,args);
+ "",0,200,args);
assertU(adoc("tv_text", "basic fast vector highlighter test",
"id", "1"));
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/highlight/HighlighterConfigTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/highlight/HighlighterConfigTest.java b/solr/core/src/test/org/apache/solr/highlight/HighlighterConfigTest.java
index f022e96..5832132 100644
--- a/solr/core/src/test/org/apache/solr/highlight/HighlighterConfigTest.java
+++ b/solr/core/src/test/org/apache/solr/highlight/HighlighterConfigTest.java
@@ -62,7 +62,7 @@ public class HighlighterConfigTest extends AbstractSolrTestCase {
args.put("df", "t_text");
args.put("hl.fl", "");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("t_text", "a long day's night", "id", "1"));
assertU(commit());
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java b/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java
index f0b58cd..759de00 100644
--- a/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java
+++ b/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java
@@ -119,7 +119,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put(HighlightParams.MERGE_CONTIGUOUS_FRAGMENTS, "true");
args.put(HighlightParams.METHOD, "original"); // test works; no complaints
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
String input = "this is some long text. It has the word long in many places. In fact, it has long on some different fragments. " +
"Let us see what happens to long in this case.";
String gold = "this is some <em>long</em> text. It has the word <em>long</em> in many places. In fact, it has <em>long</em> on some different fragments. " +
@@ -145,7 +145,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put(HighlightParams.MERGE_CONTIGUOUS_FRAGMENTS, "false");
args.put("f.t_text." + HighlightParams.MERGE_CONTIGUOUS_FRAGMENTS, "false");
sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertQ("Merge Contiguous",
sumLRF.makeRequest("t_text:long"),
"//lst[@name='highlighting']/lst[@name='1']",
@@ -165,7 +165,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.fl", "tv_text");
args.put("hl.snippets", "2");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard",0,200,args);
+ "",0,200,args);
assertU(adoc("tv_text", LONG_TEXT,
"id", "1"));
@@ -186,7 +186,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl", "true");
args.put("hl.fl", "tv_no_off_text");
- TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory("", 0, 200, args);
assertU(adoc("tv_no_off_text", "Crackerjack Cameron", "id", "1"));
assertU(commit());
@@ -229,7 +229,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.fl", "tv_mv_text");
args.put("hl.snippets", "2");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard",0,200,args);
+ "",0,200,args);
assertU(adoc("tv_mv_text", LONG_TEXT,
"tv_mv_text", LONG_TEXT,
@@ -256,7 +256,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.fl", "tv_mv_text");
args.put("hl.snippets", "2");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard",0,200,args);
+ "",0,200,args);
String shortText = "short";
assertU(adoc("tv_mv_text", shortText,
@@ -282,7 +282,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("qf", "tv_text");
args.put("q.alt", "*:*");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "dismax",0,200,args);
+ "/dismax",0,200,args);
assertU(adoc("tv_text", "a long day's night", "id", "1"));
assertU(commit());
@@ -309,7 +309,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.fl", "textgap");
args.put("df", "textgap");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("textgap", "first entry hasnt queryword",
"textgap", "second entry has queryword long",
@@ -331,7 +331,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.fl", "textgap");
args.put("df", "textgap");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("textgap", "first entry has one word foo",
"textgap", "second entry has both words foo bar",
@@ -370,7 +370,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("df", "t_text");
args.put("hl.fl", "");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("t_text", "a long day's night", "id", "1"));
assertU(commit());
@@ -392,7 +392,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl", "false");
args.put("hl.fl", "t_text");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("t_text", "a long day's night", "id", "1"));
assertU(commit());
@@ -410,7 +410,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl", "true");
args.put("hl.fl", "t_text tv_text");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("t_text", "a long day's night", "id", "1",
"tv_text", "a long night's day"));
@@ -437,7 +437,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.fl", "t_text1 t_text2");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
// default should highlight both random and words in both fields
assertQ("Test Default",
sumLRF.makeRequest("t_text1:random OR t_text2:words"),
@@ -449,7 +449,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
// requireFieldMatch=true - highlighting should only occur if term matched in that field
args.put("hl.requireFieldMatch", "true");
sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertQ("Test RequireFieldMatch",
sumLRF.makeRequest("t_text1:random OR t_text2:words"),
"//lst[@name='highlighting']/lst[@name='1']",
@@ -463,7 +463,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
assertU(delI("1"));
assertU(commit());
sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertQ("Test RequireFieldMatch on un-optimized index",
sumLRF.makeRequest("t_text1:random OR t_text2:words"),
"//lst[@name='highlighting']/lst[@name='2']",
@@ -482,7 +482,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.simple.pre","<B>");
args.put("hl.simple.post", "</B>");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("t_text", "a long days night", "id", "1"));
assertU(commit());
@@ -497,7 +497,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("f.t_text.hl.simple.pre", "<I>");
args.put("f.t_text.hl.simple.post", "</I>");
sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertQ("Basic summarization",
sumLRF.makeRequest("t_text:long"),
"//lst[@name='highlighting']/lst[@name='1']",
@@ -513,7 +513,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl", "true");
args.put("hl.fl", "tv_text");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
String text =
@@ -537,7 +537,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
final String field = random().nextBoolean() ? "t_text" : "tv_text";
args.put("hl.fl", field);
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc(field, LONG_TEXT, "id", "1"));
@@ -549,14 +549,14 @@ public class HighlighterTest extends SolrTestCaseJ4 {
"//lst[@name='1']/arr[count(str)=1]"
);
args.put("hl.maxAnalyzedChars", "20");
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("token at end of text",
sumLRF.makeRequest(field + ":disjoint"),
"//lst[@name='highlighting']/lst[@name='1']",
"//lst[@name='1'][not(*)]"
);
args.put("hl.maxAnalyzedChars", "-1");
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("token at start of text",
sumLRF.makeRequest(field + ":disjoint"),
"//lst[@name='highlighting']/lst[@name='1']",
@@ -598,7 +598,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.regex.pattern", "[-\\w ,\"']{20,200}");
args.put("hl.regex.slop", ".9");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
String t = "This is an example of a sentence. Another example \"sentence\" with " +
"special characters\nand a line-break! Miscellaneous character like ^ are " +
@@ -617,7 +617,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
);
// try with some punctuation included
args.put("hl.regex.pattern", "[-\\w ,^/\\n\"']{20,200}");
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("regex fragmenter 2",
sumLRF.makeRequest("t_text:example"),
"//lst[@name='highlighting']/lst[@name='1']",
@@ -640,7 +640,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl", "true");
args.put("hl.fl", "tv_text");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertQ("Basic summarization",
sumLRF.makeRequest("tv_text:long"),
"//lst[@name='highlighting']/lst[@name='1']",
@@ -650,7 +650,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
// 25
args.put("hl.fragsize","25");
sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertQ("Basic summarization",
sumLRF.makeRequest("tv_text:long"),
"//lst[@name='highlighting']/lst[@name='1']",
@@ -660,7 +660,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
// 0 - NullFragmenter
args.put("hl.fragsize","0");
sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertQ("Basic summarization",
sumLRF.makeRequest("tv_text:long"),
"//lst[@name='highlighting']/lst[@name='1']",
@@ -684,7 +684,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.fragsize","0");
args.put("hl.fl", "t_text");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
// no alternate
assertQ("Alternate summarization",
@@ -695,7 +695,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
// with an alternate
args.put("hl.alternateField", "foo_t");
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("Alternate summarization",
sumLRF.makeRequest("tv_text:keyword"),
"//lst[@name='highlighting']/lst[@name='1' and count(*)=1]",
@@ -705,7 +705,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
// with an alternate + max length
args.put("hl.alternateField", "t_text");
args.put("hl.maxAlternateFieldLength", "15");
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("Alternate summarization",
sumLRF.makeRequest("tv_text:keyword"),
"//lst[@name='highlighting']/lst[@name='1' and count(*)=1]",
@@ -715,7 +715,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
// with a non-existing alternate field + max length
args.put("hl.alternateField", "NonExistingField");
args.put("hl.maxAlternateFieldLength", "15");
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("Alternate summarization",
sumLRF.makeRequest("tv_text:keyword"),
"//lst[@name='highlighting']/lst[@name='1' and count(*)=1]",
@@ -744,7 +744,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.alternateField", "tv_text");
args.put("hl.maxAlternateFieldLength", "39");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertQ("Alternate summarization with highlighting",
sumLRF.makeRequest("tv_text:keyword"),
"//lst[@name='highlighting']/lst[@name='1' and count(*)=1]",
@@ -761,7 +761,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
// With hl.requireFieldMatch, will not highlight but fall back to plain-text alternate
args.put("hl.requireFieldMatch", "true");
sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertQ("Alternate summarization with highlighting, requireFieldMatch",
sumLRF.makeRequest("other_t:keyword"),
"//lst[@name='highlighting']/lst[@name='1' and count(*)=1]",
@@ -774,7 +774,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.remove("hl.alternateField");
args.put("f.t_text.hl.alternateField", "tv_text");
args.put("f.t_text.hl.maxAlternateFieldLength", "0");
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("Alternate summarization with highlighting",
sumLRF.makeRequest("tv_text:keyword"),
"//lst[@name='highlighting']/lst[@name='1' and count(*)=1]",
@@ -786,7 +786,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.tag.pre", "<fvhpre>");
args.put("hl.tag.post", "</fvhpost>");
args.put("f.t_text.hl.maxAlternateFieldLength", "18");
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("Alternate summarization with highlighting using FVH",
sumLRF.makeRequest("tv_text:keyword"),
"//lst[@name='highlighting']/lst[@name='1' and count(*)=1]",
@@ -795,7 +795,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
// Prove it is possible to turn off highlighting of alternate field
args.put("hl.highlightAlternate", "false");
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("Alternate summarization without highlighting",
sumLRF.makeRequest("tv_text:keyword"),
"//lst[@name='highlighting']/lst[@name='1' and count(*)=1]",
@@ -813,7 +813,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.usePhraseHighlighter", "false");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
// String borrowed from Lucene's HighlighterTest
String t = "This piece of text refers to Kennedy at the beginning then has a longer piece of text that is very long in the middle and finally ends with another reference to Kennedy";
@@ -843,7 +843,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
// now check if Lucene-794 highlighting works as expected
args.put("hl.usePhraseHighlighter", "true");
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
// check phrase highlighting
assertQ("Phrase highlighting - Lucene-794",
@@ -877,7 +877,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
assertU(commit());
assertU(optimize());
- TestHarness.LocalRequestFactory lrf = h.getRequestFactory("standard", 0,
+ TestHarness.LocalRequestFactory lrf = h.getRequestFactory("", 0,
10, args);
SolrQueryRequest request = lrf.makeRequest("test");
@@ -893,7 +893,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
request.close();
args.put("hl.fl", "foo_*");
- lrf = h.getRequestFactory("standard", 0, 10, args);
+ lrf = h.getRequestFactory("", 0, 10, args);
request = lrf.makeRequest("test");
highlighter = HighlightComponent.getHighlighter(h.getCore());
highlightFieldNames = Arrays.asList(highlighter.getHighlightFields(null,
@@ -906,7 +906,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
// SOLR-5127
args.put("hl.fl", (random().nextBoolean() ? "foo_*,bar_*" : "bar_*,foo_*"));
- lrf = h.getRequestFactory("standard", 0, 10, args);
+ lrf = h.getRequestFactory("", 0, 10, args);
// hl.fl ordering need not be preserved in output
final Set<String> highlightedSetExpected = new HashSet<String>();
highlightedSetExpected.add("foo_s");
@@ -931,7 +931,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.usePhraseHighlighter", "true");
args.put("hl.highlightMultiTerm", "true");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("t_text", "a long day's night", "id", "1"));
assertU(commit());
@@ -955,7 +955,7 @@ public class HighlighterTest extends SolrTestCaseJ4 {
args.put("hl.usePhraseHighlighter", "true");
args.put("hl.highlightMultiTerm", "true");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("t_text", "a long day's night", "id", "1"));
assertU(commit());
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java b/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
index a8e7ecd..b2cb5f3 100644
--- a/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
@@ -43,7 +43,7 @@ public class SolrMetricsIntegrationTest extends SolrTestCaseJ4 {
private static final int MAX_ITERATIONS = 20;
private static final String CORE_NAME = "metrics_integration";
private static final String METRIC_NAME = "requestTimes";
- private static final String HANDLER_NAME = "standard";
+ private static final String HANDLER_NAME = "/select";
private static final String[] REPORTER_NAMES = {"reporter1", "reporter2"};
private static final String UNIVERSAL = "universal";
private static final String SPECIFIC = "specific";
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java b/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
index 0ee345e..35a66c3 100644
--- a/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
+++ b/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
@@ -3312,7 +3312,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {
SolrQueryRequest req = req(params);
log.info("Using Params: " + params);
try {
- SolrQueryResponse rsp = h.queryAndResponse("standard", req);
+ SolrQueryResponse rsp = h.queryAndResponse("", req);
rangeFacetsFilter = (NamedList<Object>) ((NamedList<Object>) rsp.getValues().get("facet_counts")).get("facet_ranges");
} finally {
req.close();
@@ -3320,7 +3320,7 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {
params.add("facet.range.method", FacetRangeMethod.DV.toString());
req = req(params);
try {
- SolrQueryResponse rsp = h.queryAndResponse("standard", req);
+ SolrQueryResponse rsp = h.queryAndResponse("", req);
rangeFacetsDv = (NamedList<Object>) ((NamedList<Object>) rsp.getValues().get("facet_counts")).get("facet_ranges");
} finally {
req.close();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java b/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java
index fc8ddff..df0031f 100644
--- a/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java
+++ b/solr/core/src/test/org/apache/solr/request/TestIntervalFaceting.java
@@ -326,7 +326,7 @@ public class TestIntervalFaceting extends SolrTestCaseJ4 {
}
SolrQueryRequest req = req(params);
try {
- SolrQueryResponse rsp = h.queryAndResponse("standard", req);
+ SolrQueryResponse rsp = h.queryAndResponse("", req);
NamedList<Object> facetQueries = (NamedList<Object>) ((NamedList<Object>) rsp.getValues().get("facet_counts")).get("facet_queries");
NamedList<Object> facetIntervals = (NamedList<Object>) ((NamedList<Object>) (NamedList<Object>) ((NamedList<Object>) rsp.getValues().get("facet_counts"))
.get("facet_intervals")).get(field);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/search/TestComplexPhraseQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/TestComplexPhraseQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestComplexPhraseQParserPlugin.java
index 8c59281..02060a9 100644
--- a/solr/core/src/test/org/apache/solr/search/TestComplexPhraseQParserPlugin.java
+++ b/solr/core/src/test/org/apache/solr/search/TestComplexPhraseQParserPlugin.java
@@ -102,7 +102,7 @@ public class TestComplexPhraseQParserPlugin extends AbstractSolrTestCase {
args.put(CommonParams.FL, "id");
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("name", "john smith", "id", "1"));
assertU(adoc("name", "johathon smith", "id", "2"));
@@ -181,7 +181,7 @@ public class TestComplexPhraseQParserPlugin extends AbstractSolrTestCase {
TestHarness.LocalRequestFactory sumLRF = h.getRequestFactory(
- "standard", 0, 200, args);
+ "", 0, 200, args);
assertU(adoc("name", "john smith smith john", "id", "1"));
assertU(adoc("name", "johathon smith smith johathon", "id", "2"));
@@ -198,7 +198,7 @@ public class TestComplexPhraseQParserPlugin extends AbstractSolrTestCase {
);
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("PhraseHighlighter=true Test",
sumLRF.makeRequest("name:\"(john johathon) smith\""),
"//lst[@name='highlighting']/lst[@name='1']",
@@ -209,7 +209,7 @@ public class TestComplexPhraseQParserPlugin extends AbstractSolrTestCase {
args.put(HighlightParams.USE_PHRASE_HIGHLIGHTER, Boolean.FALSE.toString());
- sumLRF = h.getRequestFactory("standard", 0, 200, args);
+ sumLRF = h.getRequestFactory("", 0, 200, args);
assertQ("PhraseHighlighter=false Test",
sumLRF.makeRequest("name:\"(john johathon) smith\""),
"//lst[@name='highlighting']/lst[@name='1']",
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetDistribTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetDistribTest.java b/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetDistribTest.java
index 1b12657..123ce97 100644
--- a/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetDistribTest.java
+++ b/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetDistribTest.java
@@ -137,7 +137,7 @@ public class BlockJoinFacetDistribTest extends SolrCloudTestCase{
oldFacetsEnabled&&usually() ? "facet.limit" : "ignore" , "1",
oldFacetsEnabled&&usually() ? "facet.mincount" : "ignore" , "2",
oldFacetsEnabled&&usually() ? "facet.overrequest.count" : "ignore" , "0",
- "qt", random().nextBoolean() ? "blockJoinDocSetFacetRH" : "blockJoinFacetRH",
+ "qt", random().nextBoolean() ? "/blockJoinDocSetFacetRH" : "/blockJoinFacetRH",
"child.facet.field", "COLOR_s",
"child.facet.field", "SIZE_s",
"distrib.singlePass", random().nextBoolean() ? "true":"false",
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetRandomTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetRandomTest.java b/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetRandomTest.java
index 1b04d79..21ec780 100644
--- a/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetRandomTest.java
+++ b/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetRandomTest.java
@@ -46,7 +46,7 @@ public class BlockJoinFacetRandomTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
initCore("solrconfig-blockjoinfacetcomponent.xml", "schema-blockjoinfacetcomponent.xml");
- handler = random().nextBoolean() ? "blockJoinDocSetFacetRH":"blockJoinFacetRH";
+ handler = random().nextBoolean() ? "/blockJoinDocSetFacetRH":"/blockJoinFacetRH";
facets = createFacets();
createIndex();
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetSimpleTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetSimpleTest.java b/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetSimpleTest.java
index 5e610cf..c4d3a64 100644
--- a/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetSimpleTest.java
+++ b/solr/core/src/test/org/apache/solr/search/join/BlockJoinFacetSimpleTest.java
@@ -32,7 +32,7 @@ public class BlockJoinFacetSimpleTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
initCore("solrconfig-blockjoinfacetcomponent.xml", "schema-blockjoinfacetcomponent.xml");
- handler = random().nextBoolean() ? "blockJoinDocSetFacetRH":"blockJoinFacetRH";
+ handler = random().nextBoolean() ? "/blockJoinDocSetFacetRH":"/blockJoinFacetRH";
createIndex();
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java b/solr/core/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java
index cb5bba7..29551de 100644
--- a/solr/core/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java
+++ b/solr/core/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java
@@ -83,7 +83,7 @@ public class DirectSolrSpellCheckerTest extends SolrTestCaseJ4 {
@Test
public void testOnlyMorePopularWithExtendedResults() throws Exception {
- assertQ(req("q", "teststop:fox", "qt", "spellCheckCompRH", SpellCheckComponent.COMPONENT_NAME, "true", SpellingParams.SPELLCHECK_DICT, "direct", SpellingParams.SPELLCHECK_EXTENDED_RESULTS, "true", SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR, "true"),
+ assertQ(req("q", "teststop:fox", "qt", "/spellCheckCompRH", SpellCheckComponent.COMPONENT_NAME, "true", SpellingParams.SPELLCHECK_DICT, "direct", SpellingParams.SPELLCHECK_EXTENDED_RESULTS, "true", SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR, "true"),
"//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='fox']/int[@name='origFreq']=1",
"//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='fox']/arr[@name='suggestion']/lst/str[@name='word']='foo'",
"//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='fox']/arr[@name='suggestion']/lst/int[@name='freq']=2",
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java b/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java
index 5428044..06f18fc 100644
--- a/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java
+++ b/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java
@@ -115,7 +115,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
params.add(SpellingParams.SPELLCHECK_ALTERNATIVE_TERM_COUNT, "10");
params.add(CommonParams.Q, "id:[1 TO 10] AND lowerfilt:lovw");
{
- SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+ SolrRequestHandler handler = core.getRequestHandler("/spellCheckCompRH");
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
@@ -147,7 +147,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
params.add(CommonParams.Q, "lowerfilt:(hypenated-wotd)");
{
- SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+ SolrRequestHandler handler = core.getRequestHandler("/spellCheckCompRH");
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
@@ -164,10 +164,10 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
params.remove(CommonParams.Q);
params.add("defType", "dismax");
- params.add("qf", "lowerfilt");
+ params.add("qf", "/lowerfilt");
params.add(CommonParams.Q, "hypenated-wotd");
{
- SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+ SolrRequestHandler handler = core.getRequestHandler("/spellCheckCompRH");
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.add("responseHeader", new SimpleOrderedMap());
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
@@ -194,7 +194,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
SpellingParams.SPELLCHECK_COLLATE, "true",
SpellingParams.SPELLCHECK_MAX_COLLATION_TRIES, "10",
SpellingParams.SPELLCHECK_MAX_COLLATIONS, "10",
- "qt", "spellCheckCompRH",
+ "qt", "/spellCheckCompRH",
"defType", "edismax",
"qf", "teststop",
"mm", "1",
@@ -210,7 +210,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
SpellingParams.SPELLCHECK_COLLATE, "true",
SpellingParams.SPELLCHECK_MAX_COLLATION_TRIES, "10",
SpellingParams.SPELLCHECK_MAX_COLLATIONS, "10",
- "qt", "spellCheckCompRH",
+ "qt", "/spellCheckCompRH",
"defType", "edismax",
"qf", "teststop",
"mm", "1",
@@ -241,7 +241,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
//Because a FilterQuery is applied which removes doc id#1 from possible hits, we would
//not want the collations to return us "lowerfilt:(+faith +hope +loaves)" as this only matches doc id#1.
- SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+ SolrRequestHandler handler = core.getRequestHandler("/spellCheckCompRH");
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
@@ -276,7 +276,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
//SpellCheckCompRH has no "qf" defined. It will not find "peace" from "peac" despite it being in the dictionary
//because requrying against this Request Handler results in 0 hits.
- SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+ SolrRequestHandler handler = core.getRequestHandler("/spellCheckCompRH");
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
@@ -291,7 +291,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
//SpellCheckCompRH1 has "lowerfilt1" defined in the "qf" param. It will find "peace" from "peac" because
//requrying field "lowerfilt1" returns the hit.
params.remove(SpellingParams.SPELLCHECK_BUILD);
- handler = core.getRequestHandler("spellCheckCompRH1");
+ handler = core.getRequestHandler("/spellCheckCompRH1");
rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
req = new LocalSolrQueryRequest(core, params);
@@ -323,7 +323,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
// Returns 1 collation as a single string.
// All words are "correct" per the dictionary, but this collation would
// return no results if tried.
- SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+ SolrRequestHandler handler = core.getRequestHandler("/spellCheckCompRH");
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
@@ -340,7 +340,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
params.remove(SpellingParams.SPELLCHECK_BUILD);
params.add(SpellingParams.SPELLCHECK_MAX_COLLATION_TRIES, "5");
params.add(SpellingParams.SPELLCHECK_MAX_COLLATIONS, "1");
- handler = core.getRequestHandler("spellCheckCompRH");
+ handler = core.getRequestHandler("/spellCheckCompRH");
rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
req = new LocalSolrQueryRequest(core, params);
@@ -358,7 +358,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
params.remove(SpellingParams.SPELLCHECK_MAX_COLLATIONS);
params.add(SpellingParams.SPELLCHECK_MAX_COLLATION_TRIES, "10");
params.add(SpellingParams.SPELLCHECK_MAX_COLLATIONS, "2");
- handler = core.getRequestHandler("spellCheckCompRH");
+ handler = core.getRequestHandler("/spellCheckCompRH");
rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
req = new LocalSolrQueryRequest(core, params);
@@ -377,7 +377,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
// Testing return multiple collations with expanded collation response
// format.
params.add(SpellingParams.SPELLCHECK_COLLATE_EXTENDED_RESULTS, "true");
- handler = core.getRequestHandler("spellCheckCompRH");
+ handler = core.getRequestHandler("/spellCheckCompRH");
rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
req = new LocalSolrQueryRequest(core, params);
@@ -430,7 +430,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
//Because a FilterQuery is applied which removes doc id#1 from possible hits, we would
//not want the collations to return us "lowerfilt:(+faith +hope +loaves)" as this only matches doc id#1.
- SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+ SolrRequestHandler handler = core.getRequestHandler("/spellCheckCompRH");
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
@@ -451,7 +451,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
assertQ(
req(
"q", "teststop:(flew AND form AND heathrow)",
- "qt", "spellCheckCompRH",
+ "qt", "/spellCheckCompRH",
"indent", "true",
SpellCheckComponent.COMPONENT_NAME, "true",
SpellCheckComponent.SPELLCHECK_BUILD, "true",
@@ -479,7 +479,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
assertQ(
req(
"q", "teststop:(june AND customs)",
- "qt", "spellCheckCompRH",
+ "qt", "/spellCheckCompRH",
"indent", "true",
SpellCheckComponent.COMPONENT_NAME, "true",
SpellCheckComponent.SPELLCHECK_DICT, dictionary[i],
@@ -500,8 +500,9 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
"//lst[@name='spellcheck']/lst[@name='collations']/lst[@name='collation']/lst[@name='misspellingsAndCorrections']/str[@name='june']='jane'"
);
//SOLR-5090, alternativeTermCount==0 was being evaluated, sometimes would throw NPE
- assertQ(req("q", "teststop:(june customs)", "mm", "2", "qt",
- "spellCheckCompRH", "indent", "true",
+ assertQ(req("q", "teststop:(june customs)", "mm", "2",
+ "qt", "/spellCheckCompRH",
+ "indent", "true",
SpellCheckComponent.COMPONENT_NAME, "true",
SpellCheckComponent.SPELLCHECK_DICT, dictionary[i],
SpellCheckComponent.SPELLCHECK_COUNT, "10",
@@ -522,7 +523,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
SpellingParams.SPELLCHECK_MAX_COLLATION_TRIES, "1",
SpellingParams.SPELLCHECK_MAX_COLLATIONS, "1",
SpellingParams.SPELLCHECK_COLLATE_EXTENDED_RESULTS, "true",
- "qt", "spellCheckCompRH");
+ "qt", "/spellCheckCompRH");
// default case, no SPELLCHECK_COLLATE_MAX_COLLECT_DOCS should be exact num hits
assertQ(req(reusedParams,
@@ -589,7 +590,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATION_TRIES, "0");
params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATIONS, "2");
params.add(CommonParams.Q, "lowerfilt:(+fauth)");
- SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+ SolrRequestHandler handler = core.getRequestHandler("/spellCheckCompRH");
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
@@ -618,7 +619,7 @@ public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
params.add(CommonParams.Q, "lowerfilt:(+fauth)");
params.add(CommonParams.SORT, "id asc");
params.add(CursorMarkParams.CURSOR_MARK_PARAM, CursorMarkParams.CURSOR_MARK_START);
- SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+ SolrRequestHandler handler = core.getRequestHandler("/spellCheckCompRH");
SolrQueryResponse rsp = new SolrQueryResponse();
rsp.addResponseHeader(new SimpleOrderedMap());
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/82a44beb/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorWithCollapseTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorWithCollapseTest.java b/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorWithCollapseTest.java
index f985b41..fe8e787 100644
--- a/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorWithCollapseTest.java
+++ b/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorWithCollapseTest.java
@@ -57,7 +57,7 @@ public class SpellCheckCollatorWithCollapseTest extends SolrTestCaseJ4 {
SpellingParams.SPELLCHECK_MAX_COLLATION_TRIES, "5",
SpellingParams.SPELLCHECK_MAX_COLLATIONS, "1",
CommonParams.Q, "a_s:lpve",
- CommonParams.QT, "spellCheckCompRH_Direct",
+ CommonParams.QT, "/spellCheckCompRH_Direct",
SpellingParams.SPELLCHECK_COLLATE_MAX_COLLECT_DOCS, "5",
CommonParams.FQ, "{!collapse field=group_i}",
"expand", "true"),