On Jun 12, 2007, at 1:57 PM, Chris Hostetter wrote:
: Instead, maybe a relative path should be made relative to Solr's
home
: directory instead of to the current working directory?
I'm not sure how i feel about that ... it would be one thing if
Solr could
generate an error if the dataDir didn't exist, but since we create the
directory on the fly as needed, changing this behavior <dataDir> is
relative working directory vs solr.home) could really confuse people.
Does the system property substitution stuff in the solrconfig deal
with
substitutions that contain other substitutions? if so then maybe we
should set the solr.solr.home system property if we see that solr
home has
been specified with JNDI, and make the example solrconfig something
like...
<dataDir>${solr.data.dir:${solr.solr.home}/solr/data}</dataDir>
No, it does not support that type of substitution.
...but people can still choose to use something like...
<dataDir>data</dataDir>
...and have it mean "the data directory in my current working
directory"
Of course, i may just be paranoid about breaking esoteric use cases.
It's a good point to consider. Personally I'd never run with things
specified out of the current directory that way, so its hard for me
to identify with the troubles this change would make. If folks were
using the example application as-is this change wouldn't affect them.
I'm ambivalent though - I'm happy to reverse the change to the
example solrconfig.xml too, though I like that one can fire up the
example configuration with a different data directory easily.
Erik