lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: finer granularity of configuration
Date Sun, 04 Feb 2007 21:48:57 GMT
On 2/3/07, Erik Hatcher <> wrote:
> I'd like to be able to have a common schema.xml and solrconfig.xml
> but be able to fire up Solr instances pointed to different data
> directories.  I realize we have SOLR-79 in JIRA.  Is that the
> approach we want long term?
> Here's an off-the-cuff idea... what if we hook Config.get() to look
> for system properties that would override configuration values.
> SolrCore does this:
>           dataDir = SolrConfig.config.get("dataDir",Config.getInstanceDir()
> +"data");
> If it looked for a system property (perhaps with a "solr." prefix)
> you could override anything Config serves up.  Thoughts?

Seems like a good idea... and as long as the env vars don't clash,
this doesn't conflict with SOLR-79.
Perhaps the full path with a leading solr.

So -Dsolr.config.dataDir=/path

> Speaking of which, is this incorrect in
>           public String getDataDir() { return index_path; }  // shouldn't
> this return dataDir?
>           public String getIndexDir() { return index_path; }

Fixed.  getDataDir() wasn't used anywhere outside SolrCore, and I
changed uses of getDataDir to getIndexDir.


View raw message