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 Frank Wesemann <f....@fotofinder.net> on 2010/09/10 13:00:32 UTC

Solr CoreAdmin create ignores dataDir Parameter

Hello,
if I am trying to create a new SolrCore based on an extisting one via 
the CoreAdmin HTTP API,

http://localhost:8983/solr/admin/cores?action=CREATE&name=newCore&instanceDir=old_instance&schema=newSchema.xml&dataDir=newdata 
<http://localhost:8983/solr/admin/cores?action=CREATE&name=coreX&instanceDir=path_to_instance_directory&config=config_file_name.xml&schema=schem_file_name.xml&dataDir=data>

the dataDir parameter is ignored.
Instead the dataDir from the solrconfig.xml is taken in account.

I had a look at the Sources and saw that the CoreContainer's create() 
method,
calls the SolrCore Construktor with an dataDir value of "null", which 
leads to a dataDir primarily read from the config and not from the 
CoreDescriptior.

Shouldn't the CoreDescriptor, being more specific, take precedence over 
the config?

-- 
mit freundlichem Gruß,

Frank Wesemann
Fotofinder GmbH         USt-IdNr. DE812854514
Software Entwicklung    Web: http://www.fotofinder.com/
Potsdamer Str. 96       Tel: +49 30 25 79 28 90
10785 Berlin            Fax: +49 30 25 79 28 999

Sitz: Berlin
Amtsgericht Berlin Charlottenburg (HRB 73099)
Geschäftsführer: Ali Paczensky




Re: Solr CoreAdmin create ignores dataDir Parameter

Posted by Frank Wesemann <f....@fotofinder.net>.
MitchK schrieb:
> Frank,
>
> have a look at SOLR-646.
>
> Do you think a workaround for the data-dir-tag in the solrconfig.xml can
> help?
> I think about something like <dataDir>${solr./data/corename}</dataDir> for
> illustration.
>
> Unfortunately I am not very skilled in working with solr's variables and
> therefore I do not know what variables are available. 
>   
No, variables are not available at this stage.
> If we find a solution, we should provide it as a suggestion at the wiki's
> CoreAdmin-page.
>
> Kind regards,
> - Mitch
>   


-- 
mit freundlichem Gruß,

Frank Wesemann
Fotofinder GmbH         USt-IdNr. DE812854514
Software Entwicklung    Web: http://www.fotofinder.com/
Potsdamer Str. 96       Tel: +49 30 25 79 28 90
10785 Berlin            Fax: +49 30 25 79 28 999

Sitz: Berlin
Amtsgericht Berlin Charlottenburg (HRB 73099)
Geschäftsführer: Ali Paczensky




Re: Solr CoreAdmin create ignores dataDir Parameter

Posted by MitchK <mi...@web.de>.
Frank,

have a look at SOLR-646.

Do you think a workaround for the data-dir-tag in the solrconfig.xml can
help?
I think about something like <dataDir>${solr./data/corename}</dataDir> for
illustration.

Unfortunately I am not very skilled in working with solr's variables and
therefore I do not know what variables are available. 

If we find a solution, we should provide it as a suggestion at the wiki's
CoreAdmin-page.

Kind regards,
- Mitch
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-CoreAdmin-create-ignores-dataDir-Parameter-tp1451665p1454705.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr CoreAdmin create ignores dataDir Parameter

Posted by Frank Wesemann <f....@fotofinder.net>.
Mark Miller schrieb:
>
>
> I think so - what version of Solr are you using? I believe I've changed
> this on trunk a few months ago.
>
>   
We are running 1.4.2 and I looked in the solr/tags/release-1.4.1 branch 
of SVN.
The Version in trunk I can see is from 27.07.2010 and this also reads 
first config and than the CoreDescriptor.
I added a command to SOLR-1905 regarding this issue.

> - Mark
>   


-- 
mit freundlichem Gruß,

Frank Wesemann
Fotofinder GmbH         USt-IdNr. DE812854514
Software Entwicklung    Web: http://www.fotofinder.com/
Potsdamer Str. 96       Tel: +49 30 25 79 28 90
10785 Berlin            Fax: +49 30 25 79 28 999

Sitz: Berlin
Amtsgericht Berlin Charlottenburg (HRB 73099)
Geschäftsführer: Ali Paczensky




Re: Solr CoreAdmin create ignores dataDir Parameter

Posted by Mark Miller <ma...@gmail.com>.
On 9/10/10 7:00 AM, Frank Wesemann wrote:
> Hello,
> if I am trying to create a new SolrCore based on an extisting one via
> the CoreAdmin HTTP API,
> 
> http://localhost:8983/solr/admin/cores?action=CREATE&name=newCore&instanceDir=old_instance&schema=newSchema.xml&dataDir=newdata
> <http://localhost:8983/solr/admin/cores?action=CREATE&name=coreX&instanceDir=path_to_instance_directory&config=config_file_name.xml&schema=schem_file_name.xml&dataDir=data>
> 
> 
> the dataDir parameter is ignored.
> Instead the dataDir from the solrconfig.xml is taken in account.
> 
> I had a look at the Sources and saw that the CoreContainer's create()
> method,
> calls the SolrCore Construktor with an dataDir value of "null", which
> leads to a dataDir primarily read from the config and not from the
> CoreDescriptior.
> 
> Shouldn't the CoreDescriptor, being more specific, take precedence over
> the config?
> 


I think so - what version of Solr are you using? I believe I've changed
this on trunk a few months ago.

- Mark