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 Michael Lackhoff <mi...@lackhoff.de> on 2009/02/09 13:31:12 UTC
Moving from single core to multicore
Hello,
I am not that experienced but managed to get a Solr index going by
copying the "example" dir from the distribution (1.3 released version)
and changing the fields in schema.xml to my needs. As I said everything
is working very well so far.
Now I need a second index on the same machine and the natural solution
seems to be multicore (I would really like to keep the two distinct so I
didn't put everything in one index).
But I have some problems setting this up. As long as I try the multicore
sample everything works but when I copy my schema.xml into the
multicore/core0/conf dir I only get 404 error messages when I enter the
admin url.
Looks like I cannot just copy over a single core config to a multicore
environment and that is o.k., what I am missing is some guidance what to
look out for. What are the settings that have to be adjusted to
multicore? I would like to avoid trial and error for every single
setting I have in my config.
And a related question: I would like to keep the existing data dir as
core0-datadir (/path_to_installation/example/solr/data). Is this
possible with the dataDir parameter? And if yes, what would be the
correct value? "/solr/data/" or
"/path_to_installation/example/solr/data/"? Do I need an absolute path
or is it relative to the dir where my start.jar is?
Thanks,
Michael
Re: Moving from single core to multicore
Posted by Michael Lackhoff <mi...@lackhoff.de>.
On 10.02.2009 02:39 Chris Hostetter wrote:
> : Now all that is left is a more cosmetic change I would like to make:
> : I tried to place the solr.xml in the example dir to get rid of the
> : "-Dsolr.solr.home=multicore" for the start and changed the first entry
> : from "core0" to "solr" and moved the core1 dir from multicore directly
> : under the example dir
> : Idea behind all this: Use the original single core under "solr" as core0
> : and add a second one on the same directory level ("core1" parallel to
> : "solr"). Then I started solr with the old "java -jar start.jar" in the
> : "example" dir. But the multicore config seems to be ignored then, I get
>
> solr looks for conf/solr.xml relative the "Solr Home Dir" and if it
> doesn't find it then it looks for conf/solrconfig.xml ... if you don't set
> the solr.solr.home system property then the Solr Home Dir defaults to
> "./solr/"
>
> so putting your new solr.xml file in example/solr/conf should be what you
> are looking for.
Almost. I had to change solr.xml like this, otherwise everything was
expected under ./solr looking for solr/solr and solr/core1:
<cores adminPath="/admin/cores">
<core name="core0" instanceDir=".">
<property name="dataDir" value="./data" />
</core>
<core name="core1" instanceDir="../core1">
<property name="dataDir" value="../core1/data" />
</core>
</cores>
Though the dataDir property seems to be ignored, I had to set it in
solrconfig.xml of both cores.
Thanks for all your help, the support all of you are giving is really
outstanding!
--Michael
Re: Moving from single core to multicore
Posted by Chris Hostetter <ho...@fucit.org>.
: Now all that is left is a more cosmetic change I would like to make:
: I tried to place the solr.xml in the example dir to get rid of the
: "-Dsolr.solr.home=multicore" for the start and changed the first entry
: from "core0" to "solr" and moved the core1 dir from multicore directly
: under the example dir
: Idea behind all this: Use the original single core under "solr" as core0
: and add a second one on the same directory level ("core1" parallel to
: "solr"). Then I started solr with the old "java -jar start.jar" in the
: "example" dir. But the multicore config seems to be ignored then, I get
solr looks for conf/solr.xml relative the "Solr Home Dir" and if it
doesn't find it then it looks for conf/solrconfig.xml ... if you don't set
the solr.solr.home system property then the Solr Home Dir defaults to
"./solr/"
so putting your new solr.xml file in example/solr/conf should be what you
are looking for.
-Hoss
Re: Moving from single core to multicore
Posted by Michael Lackhoff <mi...@lackhoff.de>.
On 09.02.2009 17:01 Ryan McKinley wrote:
> Check your solrconfig.xml you probably have somethign like this:
>
> <!-- Used to specify an alternate directory to hold all index data
> other than the default ./data under the Solr home.
> If replication is in use, this should match the replication
> configuration. -->
> <dataDir>${solr.data.dir:./solr/data}</dataDir>
> (from the example)
>
> either remove that or make each one point to the correct location
Thanks, that's it!
Now all that is left is a more cosmetic change I would like to make:
I tried to place the solr.xml in the example dir to get rid of the
"-Dsolr.solr.home=multicore" for the start and changed the first entry
from "core0" to "solr" and moved the core1 dir from multicore directly
under the example dir
Idea behind all this: Use the original single core under "solr" as core0
and add a second one on the same directory level ("core1" parallel to
"solr"). Then I started solr with the old "java -jar start.jar" in the
"example" dir. But the multicore config seems to be ignored then, I get
my old single core e.g. http://localhost:8983/solr/core1/select?q=*:* is
no longer found.
As I said everything works if I leave it in the multicore subdir and
start with "-Dsolr.solr.home=multicore" but it would be nice if I could
do without that extra subdir and the extra start parameter.
--Michael
Re: Moving from single core to multicore
Posted by Ryan McKinley <ry...@gmail.com>.
On Feb 9, 2009, at 10:40 AM, Michael Lackhoff wrote:
> On 09.02.2009 15:40 Ryan McKinley wrote:
>
>>> But I have some problems setting this up. As long as I try the
>>> multicore
>>> sample everything works but when I copy my schema.xml into the
>>> multicore/core0/conf dir I only get 404 error messages when I enter
>>> the
>>> admin url.
>>
>> what is the url you are hitting?
> those from the wiki: http://localhost:8983/solr/core0/select?q=*:*
>> Do you see links from the index page?
> Sorry, I don't know what you mean by this
>
>> Are there any messages in the log files?
>
> This looks like the key. The output is a bit difficult to follow but I
> found the most likely reason: the txt files were missing
> (stopwords.txt,
> synonyms.txt ...) and then the fieldtype definitions failed. After I
> copied the complete conf dir over to multicore it is almost working
> now.
>
> Only problems: I get this warning:
> 2009-02-09 16:27:31.177::WARN: /solr/admin/
> java.lang.IllegalStateException: STREAM
> at org.mortbay.jetty.Response.getWriter(Response.java:571)
> [lots more]
>
> and both cores seem to reference the old single core data. If I do a
> search both give (the same) results (from the old core), I expected
> them
> to be empty, searching in a newly created index somewhere below the
> "multicore" dir.
>
> I couldn't find a datadir definition so I still don't know how to
> add a
> real second core (not just two cores with the same data).
>
> Any ideas?
>
Check your solrconfig.xml you probably have somethign like this:
<!-- Used to specify an alternate directory to hold all index data
other than the default ./data under the Solr home.
If replication is in use, this should match the replication
configuration. -->
<dataDir>${solr.data.dir:./solr/data}</dataDir>
(from the example)
either remove that or make each one point to the correct location
ryan
> Thanks so far
> Michael
Re: Moving from single core to multicore
Posted by Michael Lackhoff <mi...@lackhoff.de>.
On 09.02.2009 15:40 Ryan McKinley wrote:
>> But I have some problems setting this up. As long as I try the
>> multicore
>> sample everything works but when I copy my schema.xml into the
>> multicore/core0/conf dir I only get 404 error messages when I enter
>> the
>> admin url.
>
> what is the url you are hitting?
those from the wiki: http://localhost:8983/solr/core0/select?q=*:*
> Do you see links from the index page?
Sorry, I don't know what you mean by this
> Are there any messages in the log files?
This looks like the key. The output is a bit difficult to follow but I
found the most likely reason: the txt files were missing (stopwords.txt,
synonyms.txt ...) and then the fieldtype definitions failed. After I
copied the complete conf dir over to multicore it is almost working now.
Only problems: I get this warning:
2009-02-09 16:27:31.177::WARN: /solr/admin/
java.lang.IllegalStateException: STREAM
at org.mortbay.jetty.Response.getWriter(Response.java:571)
[lots more]
and both cores seem to reference the old single core data. If I do a
search both give (the same) results (from the old core), I expected them
to be empty, searching in a newly created index somewhere below the
"multicore" dir.
I couldn't find a datadir definition so I still don't know how to add a
real second core (not just two cores with the same data).
Any ideas?
Thanks so far
Michael
Re: Moving from single core to multicore
Posted by Ryan McKinley <ry...@gmail.com>.
>
> But I have some problems setting this up. As long as I try the
> multicore
> sample everything works but when I copy my schema.xml into the
> multicore/core0/conf dir I only get 404 error messages when I enter
> the
> admin url.
what is the url you are hitting?
Do you see links from the index page?
Are there any messages in the log files?
ryan