Solr CoreAdmin create ignores dataDir Parameter

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Solr CoreAdmin create ignores dataDir Parameter

Frank Wesemann
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



Reply | Threaded
Open this post in threaded view
|

Re: Solr CoreAdmin create ignores dataDir Parameter

Mark Miller-3
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
Reply | Threaded
Open this post in threaded view
|

Re: Solr CoreAdmin create ignores dataDir Parameter

Frank Wesemann
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



Reply | Threaded
Open this post in threaded view
|

Re: Solr CoreAdmin create ignores dataDir Parameter

MitchK
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
Reply | Threaded
Open this post in threaded view
|

Re: Solr CoreAdmin create ignores dataDir Parameter

Frank Wesemann
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