lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Hill <jayallenh...@gmail.com>
Subject Creating new Solr cores using relative paths
Date Tue, 17 Aug 2010 06:59:04 GMT
I'm having trouble getting the core CREATE command to work with relative
paths in the solr.xml configuration.

I'm working with a layout like this:
/opt/solr [this is solr.solr.home: $SOLR_HOME]
/opt/solr/solr.xml
/opt/solr/core0/ [this is the "template" core]
/opt/solr/core0/conf/schema.xml [etc.]

/opt/tomcat/bin [where tomcat is started from: $TOMCAT_HOME/bin]

My very basic solr.xml:
<solr persistent="true">
<cores adminPath="/admin/cores">
  <core name="core0" instanceDir="core0/"/>
</cores>
</solr>

The CREATE core command works fine with absolute paths, but I have a
requirement to use relative paths. I want to be able to create a new core
like this:

http://localhost:8080/solr/admin/cores
?action=CREATE
&name=core1
&instanceDir=core1
&config=core0/conf/solrconfig.xml
&schema=core0/conf/schema.xml
(core1 is the name for the new core to be created, and I want to use the
config and schema from core0 to create the new core).

but the error is always due to the servlet container thinking
$TOMCAT_HOME/bin is the current working directory:
Caused by: java.lang.RuntimeException: *Can't find resource
'core0/conf/solrconfig.xml'* in classpath or '/opt/solr/core1/conf/', *
cwd=/opt/tomcat/bin
*
Does anyone know how to make this happen?

Thanks,
-Jay

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message