Meanwhile, I'm having trouble getting the expected behavior at all. I'll
try to give the right details (without overwhelming with too many), if
anyone can see what's going on.
Solr 1.4.1. Multi-core. 'Main' solr home with solr.xml at
/opt/solr/solr_indexer/solr.xml
The solr.xml includes actually only one core, let's start out nice and
simple:
<cores adminPath="/admin/cores">
<core name="master_prod" instanceDir="master_prod">
<property name="enable.master" value="true" />
</core>
</cores>
[The enable.master thing is a custom property my solrconfig.xml uses in
places unrelated to dataDir]
1. First try, the solrconfig at
/opt/solr/solr_indexer/master_prod/conf/solrconfig.xml includes NO
dataDir element at all.
WOAH. It just worked. Go figure. I don't know what I tried differently
before, maybe Mike is right that people (including me) get confused by
the <dataDir> element being there, and needing to delete it entirely to
get that default behavior.
So anyway.... yeah. Sorry, thanks, appears to be working, although
possibly confusing for the newbie to set up for reasons that aren't
entirely clear, since several of us in this thread had trouble getting
it right.
On 3/2/2011 2:42 PM, Mike Sokolov wrote:
Yes - I commented out the<dataDir> element in solrconfig.xml and then
got the expected behavior: the core used a data subdirectory in the core
subdirectory.
It seems like the problem arises from using the solrconfig.xml that's
distributed as example/solr/conf/solrconfig.xml
The solrconfig.xml's in example/multicore/ don't have the<dataDir>
element.
-Mike
On 03/01/2011 08:24 PM, Chris Hostetter wrote:
:<!-- 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>
that directive says "use the solr.data.dir system property to pick a path,
if it is not set, use "./solr/data" (realtive the CWD)
if you want it to use the default, then you need to eliminate it
completley, or you need to change it to the empty string...
<dataDir>${solr.data.dir:}</dataDir>
or...
<dataDir></dataDir>
-Hoss