lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nagendra Nagarajayya <>
Subject Re: multi-core solr, specifying the data directory
Date Wed, 02 Mar 2011 14:05:09 GMT
HI Jonathan:

Did you try :

<cores adminPath="/admin/cores" >
<core name="some_core" instanceDir="some_core" dataDir="data">

This should create the indexes under some_core/data or you can make 
datadir relative to some_core dir.


- NN

On 3/1/2011 7:21 AM, Jonathan Rochkind wrote:
> I did try that, yes. I tried that first in fact!  It seems to fall 
> back to a ./data directory relative to the _main_ solr directory (the 
> one above all the cores), not the core instancedir.  Which is not what 
> I expected either.
> I wonder if this should be considered a bug? I wonder if anyone has 
> considered this and thought of changing/fixing it?
> On 3/1/2011 4:23 AM, Jan Høydahl wrote:
>> Have you tried removing the<dataDir>  tag from solrconfig.xml? Then 
>> it should fall back to default ./data relative to core instancedir.
>> -- 
>> Jan Høydahl, search solution architect
>> Cominvent AS -
>> On 1. mars 2011, at 00.00, 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

View raw message