I spent a few hours chasing my tail on this one; I really just assumed
that the core's data dir would be under the core's instance dir. But I
ended up doing exactly what you did (copying from something I found on
the web).
seems like a design flaw that could be difficult to fix without breaking
some older setups?
-Mike
On 2/28/2011 6:00 PM, Jonathan Rochkind 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.
I set up multi-core like this:
<cores adminPath="/admin/cores">
<core name="some_core" instanceDir="some_core">
</core>
</cores>
Now, setting instanceDir like that works for Solr to look for the
'conf' directory in the default location you'd expect, ./some_core/conf.
You'd expect it to look for the 'data' dir for an index in
./some_core/data too, by default. But it does not seem to. It's still
looking for the 'data' directory in the _main_ solr.home/data, not
under the relevant core directory.
The only way I can manage to get it to look for the /data directory
where I expect is to spell it out with a full absolute path:
<core name="some_core" instanceDir="some_core">
<property name="dataDir" value="/path/to/main/solr/some_core/data" />
</core>
And then in the solrconfig.xml do a <dataDir>${dataDir}</dataDir>
Is this what everyone else does too? Or am I missing a better way of
doing this? I would have thought it would "just work", with Solr by
default looking for a ./data subdir of the specified instanceDir. But
it definitely doesn't seem to do that.
Should it? Anyone know if Solr in trunk past 1.4.1 has been changed to
do what I expect? Or am I wrong to expect it? Or does everyone else do
multi-core in some different way than me where this doesn't come up?
Jonathan