Author: ryan
Date: Tue Dec 11 07:21:35 2007
New Revision: 603269
URL: http://svn.apache.org/viewvc?rev=603269&view=rev
Log:
SOLR-350, for non-handler reqeusts, select core with 'String corename =
request.getParameter("core");'
This is a temporary fix till we figure something more complex to forward to jsp
files
Modified:
lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java
Modified:
lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java
URL:
http://svn.apache.org/viewvc/lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java?rev=603269&r1=603268&r2=603269&view=diff
==============================================================================
---
lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java
(original)
+++
lucene/solr/trunk/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java
Tue Dec 11 07:21:35 2007
@@ -247,6 +247,18 @@
// otherwise, let's ensure the core is in the SolrCore request
attribute so
// the servlet can retrieve it
else {
+ // TEMP -- to support /admin multicore grab the core from the request
+ // TODO -- for muticore /admin support, strip the corename from the
path
+ // and forward to the /admin jsp file
+ // req.getRequestDispatcher( path ).forward( request, response );
+ String corename = request.getParameter("core");
+ if( corename != null ) {
+ core = multicore.getCore( corename );
+ if( core == null ) {
+ throw new SolrException( SolrException.ErrorCode.BAD_REQUEST,
+ "Can not find core: '"+corename+"'" );
+ }
+ }
req.setAttribute("org.apache.solr.SolrCore", core);
}
}