You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "austin@3bx.org" <au...@3bx.org> on 2013/06/12 23:43:34 UTC
Solr.xml dataDir attribute persistence
Hello,
I’m attempting to figure out what’s required for my Solr implementation to
dynamically create new cores based on a template set of config files.
My plan is to use this “template” directory as the instance directory for
multiple cores, while maintaining a separate data directory for each core.
I’ve found that when I issue a CREATE command via the CoreAdmin handler,
everything seems to work fine; however, once Solr is restarted, those cores
that were created start using the default dataDir (i.e.
<instanceDir>/data).
It appears that the dataDir attribute is being applied when the core is
initially created, but it isn’t actually being persisted in the solr.xml
file along with the other core information.
Am I missing something on how I should be using this particular property?
Thanks in advance!
Re: Solr.xml dataDir attribute persistence
Posted by Erick Erickson <er...@gmail.com>.
This is a know bug, see:
https://issues.apache.org/jira/browse/SOLR-4862
Solr.xml persistence has several shortcomings. As
it happens I'm working on that right now, but the
results won't be ready until 4.4. I hope to get a patch
up over the weekend (SOLR-4910) and this is one
of the things I want to explicitly insure is working.
SOLR-4910 should fix SOLR-4862 as well.
In the mean time, one work-around would be to
copy the template to your core for the new
directory and create it there. Copies extra
data, but...
FWIW, this is all about to change, the combination
of "core discovery" and "named config sets" should
be just what you need, see SOLR-4478
Best
Erick
On Wed, Jun 12, 2013 at 5:43 PM, austin@3bx.org <au...@3bx.org> wrote:
> Hello,
>
>
>
> I’m attempting to figure out what’s required for my Solr implementation to
> dynamically create new cores based on a template set of config files.
>
>
>
> My plan is to use this “template” directory as the instance directory for
> multiple cores, while maintaining a separate data directory for each core.
>
>
>
> I’ve found that when I issue a CREATE command via the CoreAdmin handler,
> everything seems to work fine; however, once Solr is restarted, those cores
> that were created start using the default dataDir (i.e.
> <instanceDir>/data).
>
>
>
> It appears that the dataDir attribute is being applied when the core is
> initially created, but it isn’t actually being persisted in the solr.xml
> file along with the other core information.
>
>
>
> Am I missing something on how I should be using this particular property?
>
>
>
> Thanks in advance!