Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-636 - simplify example configs and make index.jsp links more resilient to configs loaded via an InputStream.

Chris M. Hostetterf7291f6cd5c2
diff --git a/CHANGES.txt b/CHANGES.txt
index 6c087bce21e..bae24de0a30 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -576,6 +576,10 @@ Other Changes
19. Upgraded to Lucene 2.4-dev (r669476) to support SOLR-572 (gsingers)
+20. SOLR-636: Improve/simplify example configs; and make index.jsp
+ links more resilient to configs loaded via an InputStream
+ (Lars Kotthoff, hossman)
+
Build
1. SOLR-411. Changed the names of the Solr JARs to use the defacto standard JAR names based on
project-name-version.jar. This yields, for example:
diff --git a/client/ruby/solr-ruby/solr/conf/solrconfig.xml b/client/ruby/solr-ruby/solr/conf/solrconfig.xml
index 7fec127cc40..8dc10668086 100755
--- a/client/ruby/solr-ruby/solr/conf/solrconfig.xml
+++ b/client/ruby/solr-ruby/solr/conf/solrconfig.xml
@@ -350,13 +350,7 @@
<!-- CSV update handler, loaded on demand -->
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
-
- <!-- Admin Handlers. TODO? There could be a single handler that loads them all... -->
- <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
- <requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
- <requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
- <requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
- <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
+ <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
<!-- Echo the request contents back to the client -->
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
@@ -392,13 +386,6 @@
<!-- config for the admin interface -->
<admin>
<defaultQuery>solr</defaultQuery>
- <gettableFiles>solrconfig.xml schema.xml admin-extra.html</gettableFiles>
- <!-- pingQuery should be "URLish" ...
- &amp; separated key=val pairs ... but there shouldn't be any
- URL escaping of the values -->
- <pingQuery>
- qt=dismax&amp;q=solr&amp;start=3&amp;fq=id:[* TO *]&amp;fq=cat:[* TO *]
- </pingQuery>
<!-- configure a healthcheck file for servers behind a loadbalancer
<healthcheck type="file">server-enabled</healthcheck>
-->
diff --git a/client/ruby/solr-ruby/test/conf/solrconfig.xml b/client/ruby/solr-ruby/test/conf/solrconfig.xml
index cf81bcb341e..c6cd881da46 100755
--- a/client/ruby/solr-ruby/test/conf/solrconfig.xml
+++ b/client/ruby/solr-ruby/test/conf/solrconfig.xml
@@ -332,13 +332,7 @@
<!-- CSV update handler, loaded on demand -->
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
-
- <!-- Admin Handlers. TODO? There could be a single handler that loads them all... -->
- <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
- <requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
- <requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
- <requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
- <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
+ <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
<!-- Echo the request contents back to the client -->
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
@@ -374,13 +368,6 @@
<!-- config for the admin interface -->
<admin>
<defaultQuery>solr</defaultQuery>
- <gettableFiles>solrconfig.xml schema.xml admin-extra.html</gettableFiles>
- <!-- pingQuery should be "URLish" ...
- &amp; separated key=val pairs ... but there shouldn't be any
- URL escaping of the values -->
- <pingQuery>
- qt=dismax&amp;q=solr&amp;start=3&amp;fq=id:[* TO *]&amp;fq=cat:[* TO *]
- </pingQuery>
<!-- configure a healthcheck file for servers behind a loadbalancer
<healthcheck type="file">server-enabled</healthcheck>
-->
diff --git a/example/multicore/core0/conf/solrconfig.xml b/example/multicore/core0/conf/solrconfig.xml
index f476fb5816d..338a37cc982 100644
--- a/example/multicore/core0/conf/solrconfig.xml
+++ b/example/multicore/core0/conf/solrconfig.xml
@@ -29,15 +29,11 @@
<requestHandler name="standard" class="solr.StandardRequestHandler" default="true" />
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
- <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
+ <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
<!-- config for the admin interface -->
<admin>
<defaultQuery>solr</defaultQuery>
- <gettableFiles>solrconfig.xml schema.xml admin-extra.html</gettableFiles>
- <pingQuery>
- qt=standard&amp;q=solrpingquery
- </pingQuery>
</admin>
</config>
diff --git a/example/multicore/core1/conf/solrconfig.xml b/example/multicore/core1/conf/solrconfig.xml
index f476fb5816d..338a37cc982 100644
--- a/example/multicore/core1/conf/solrconfig.xml
+++ b/example/multicore/core1/conf/solrconfig.xml
@@ -29,15 +29,11 @@
<requestHandler name="standard" class="solr.StandardRequestHandler" default="true" />
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
- <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
+ <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
<!-- config for the admin interface -->
<admin>
<defaultQuery>solr</defaultQuery>
- <gettableFiles>solrconfig.xml schema.xml admin-extra.html</gettableFiles>
- <pingQuery>
- qt=standard&amp;q=solrpingquery
- </pingQuery>
</admin>
</config>
diff --git a/src/webapp/web/admin/index.jsp b/src/webapp/web/admin/index.jsp
index acebd912202..ad4aeba78cc 100644
--- a/src/webapp/web/admin/index.jsp
+++ b/src/webapp/web/admin/index.jsp
@@ -34,8 +34,12 @@
<h3>Solr</h3>
</td>
<td>
- [<a href="file/?file=<%=core.getSchemaFile()%>">Schema</a>]
- [<a href="file/?file=<%=core.getConfigFile()%>">Config</a>]
+ <% if (null != core.getSchemaResource()) { %>
+ [<a href="file/?file=<%=core.getSchemaResource()%>">Schema</a>]
+ <% }
+ if (null != core.getConfigResource()) { %>
+ [<a href="file/?file=<%=core.getConfigResource()%>">Config</a>]
+ <% } %>
[<a href="analysis.jsp?highlight=on">Analysis</a>]
[<a href="schema.jsp">Schema Browser</a>]
<br>