I tried this in my 1.4.0 installation (commenting out what had been
working, hoping the default would be as you said works in the example):
<solr persistent="true" sharedLib="lib">
<cores adminPath="/admin/cores">
<core name="bpro" instanceDir="bpro">
<!-- <property name="solr.data.dir" value="solr/bpro/data"/> -->
</core>
<core name="pfapp" instanceDir="pfapp">
<property name="solr.data.dir" value="solr/pfapp/data"/>
</core>
</cores>
</solr>
In the log after starting up, I get these messages (among many others):
...
Mar 1, 2011 7:51:23 PM org.apache.solr.core.CoreContainer$Initializer
initialize
INFO: looking for solr.xml: /usr/local/tomcat/solr/solr.xml
Mar 1, 2011 7:51:23 PM org.apache.solr.core.SolrResourceLoader
locateSolrHome
INFO: No /solr/home in JNDI
Mar 1, 2011 7:51:23 PM org.apache.solr.core.SolrResourceLoader
locateSolrHome
INFO: solr home defaulted to 'solr/' (could not find system property or
JNDI)
Mar 1, 2011 7:51:23 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to 'solr/'
Mar 1, 2011 7:51:23 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to 'solr/bpro/'
...
Mar 1, 2011 7:51:24 PM org.apache.solr.core.SolrCore <init>
INFO: [bpro] Opening new SolrCore at solr/bpro/, dataDir=./solr/data/
...
Mar 1, 2011 7:51:25 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to 'solr/pfapp/'
...
Mar 1, 2011 7:51:26 PM org.apache.solr.core.SolrCore <init>
INFO: [pfapp] Opening new SolrCore at solr/pfapp/, dataDir=solr/pfapp/data/
and it's pretty clearly using the "wrong" directory at that point.
Some more details:
/usr/local/tomcat has the usual tomcat distribution (this is 6.0.29)
conf/server.xml has:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>rosen</Alias>
<Alias>rosen.ifactory.com</Alias>
<Context path="" docBase="/usr/local/tomcat/webapps/solr" />
</Host>
There is a solrconfig.xml in each of the core directories (should there
only be one of these?). I believe these are pretty generic (and they
are identical); the one in the bpro folder has:
<!-- Used to specify an alternate directory to hold all index data
other than the default ./data under the Solr home.
If replication is in use, this should match the replication
configuration
. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
-Mike
On 3/1/2011 4:38 PM, Jonathan Rochkind wrote:
Hmm, okay, have to try to find time to install the example/multicore
and see.
It's definitely never worked for me, weird.
Thanks.
On 3/1/2011 2:38 PM, Chris Hostetter wrote:
: Unless I'm doing something wrong, in my experience in multi-core
Solr in
: 1.4.1, you NEED to explicitly provide an absolute path to the
'data' dir.
have you looked at the example/multicore directory that was included in
the 1.4.1 release?
it has a solr.xml that loads two cores w/o specifying a data dir in the
solr.xml (or hte solrconfig.xml) and it uses the "data" dir inside the
specified instanceDir.
If that example works for you, but your own configs do not, then we'll
need more details about your own configs -- how are you running solr,
what
does the solrconfig.xml of the core look like, etc...
-Hoss