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 Stavros Delisavas <st...@delisavas.de> on 2014/01/23 09:36:05 UTC

How to use Solr for two different projects on one server

Dear Solr-Experts,

I am using Solr for my current web-application on my server successfully.
Now I would like to use it in my second web-application that is hosted
on the same server. Is it possible in any way to create two independent
instances/databases in Solr? I know that I could create another set of
fields with alternated field names, but I would prefer to be independent
on my field naming for all my projects.

Also I would like to be able to have one state of my development version
and one state of my production version on my server so that I can do
tests on my development-state without interference on my production-version.
What is the best-practice to achieve this or how can this be done in
general?

I have searched google but could not get any usefull results because I
don't even know what terms to search for with solr.
A minimal-example would be most helpfull.

Thanks a lot!

Stavros

Re: How to use Solr for two different projects on one server

Posted by Gora Mohanty <go...@mimirtech.com>.
On 23 January 2014 14:06, Stavros Delisavas <st...@delisavas.de> wrote:
> Dear Solr-Experts,
>
> I am using Solr for my current web-application on my server successfully.
> Now I would like to use it in my second web-application that is hosted
> on the same server. Is it possible in any way to create two independent
> instances/databases in Solr? I know that I could create another set of
> fields with alternated field names, but I would prefer to be independent
> on my field naming for all my projects.
[...]

Use two cores: http://wiki.apache.org/solr/CoreAdmin
These are isolated from each other, and should serve your purpose.

Regards,
Gora

Re: How to use Solr for two different projects on one server

Posted by Toke Eskildsen <te...@statsbiblioteket.dk>.
On Thu, 2014-01-23 at 09:36 +0100, Stavros Delisavas wrote:
> I am using Solr for my current web-application on my server successfully.
> Also I would like to be able to have one state of my development version
> and one state of my production version on my server so that I can do
> tests on my development-state without interference on my production-version.
> What is the best-practice to achieve this or how can this be done in
> general?

I highly recommend keeping development on another machine than
production. Solr (and any other heavy application, really) taxes all the
different resources on the system - CPU, memory & IO. A run-amok
development Solr can easily influence a production Solr on the same
machine.

Running on the same machine is also prone to human errors: Accidental
shutdown of the production server, sending test data into prod etc.


If you really need to do it, run development under a different user than
prod and see if it is possible to block access to the ports used by prod
for the development user.

- Toke Eskildsen, State and University Library, Denmark



Re: How to use Solr for two different projects on one server

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
You are right on that one. Collection is the new term. Which is why
basic example is "collection1". Core is the physical representation
and it gets a bit confusing at that level with shards and all that.
The documentation is in a transition.

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Thu, Jan 23, 2014 at 4:10 PM, Stavros Delisavas <st...@delisavas.de> wrote:
> I didn't know that the "core"-term is associated with this use case. I
> expected it to be some technical feature that allows to run more
> solr-instances for better multithread-cpu-usage. For example to activate
> two solr-cores when two cpu-cores are available on the server.
>
> So in general, I have the feeling that the term "core" is somewhat
> confusing for solr-beginners like me.
>
>
>
> Am 23.01.2014 09:54, schrieb Alexandre Rafalovitch:
>> Which is why it is curious that you did not find it. Looking back at
>> it now, do you have a suggestion of what could be improved to insure
>> people find this easier in the future?
>>
>> Regards,
>>    Alex.
>> Personal website: http://www.outerthoughts.com/
>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>> - Time is the quality of nature that keeps events from happening all
>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>> book)
>>
>>
>> On Thu, Jan 23, 2014 at 3:49 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>> Thanks for the fast responses. Looks like exactly what I was looking for!
>>>
>>>
>>>
>>>
>>> Am 23.01.2014 09:46, schrieb Furkan KAMACI:
>>>> Hi;
>>>>
>>>> Firstly you should read here and learn the terminology of Solr:
>>>> http://wiki.apache.org/solr/SolrTerminology
>>>>
>>>> Thanks;
>>>> Furkan KAMACI
>>>>
>>>>
>>>> 2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>
>>>>
>>>>> If you are not worried about them stepping on each other's toes
>>>>> (performance, disk space, etc), just create multiple collections.
>>>>> There are examples of that in standard distribution (e.g. badly named
>>>>> example/multicore).
>>>>>
>>>>> Regards,
>>>>>   Alex.
>>>>> Personal website: http://www.outerthoughts.com/
>>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>>> - Time is the quality of nature that keeps events from happening all
>>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>>> book)
>>>>>
>>>>>
>>>>> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
>>>>> wrote:
>>>>>> Dear Solr-Experts,
>>>>>>
>>>>>> I am using Solr for my current web-application on my server successfully.
>>>>>> Now I would like to use it in my second web-application that is hosted
>>>>>> on the same server. Is it possible in any way to create two independent
>>>>>> instances/databases in Solr? I know that I could create another set of
>>>>>> fields with alternated field names, but I would prefer to be independent
>>>>>> on my field naming for all my projects.
>>>>>>
>>>>>> Also I would like to be able to have one state of my development version
>>>>>> and one state of my production version on my server so that I can do
>>>>>> tests on my development-state without interference on my
>>>>> production-version.
>>>>>> What is the best-practice to achieve this or how can this be done in
>>>>>> general?
>>>>>>
>>>>>> I have searched google but could not get any usefull results because I
>>>>>> don't even know what terms to search for with solr.
>>>>>> A minimal-example would be most helpfull.
>>>>>>
>>>>>> Thanks a lot!
>>>>>>
>>>>>> Stavros
>

Re: How to use Solr for two different projects on one server

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Just download Solr stack from the download page and practice on that.
That has all the startup scripts and relative paths set up.

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Thu, Jan 23, 2014 at 7:00 PM, Stavros Delisavas <st...@delisavas.de> wrote:
> I installed solr via apt-get and followed the online tutorials that I
> found to adjust the existing schema.xml and created dataconfig.xml the
> way I needed them.
>
> Was this the wrong approach? I don't know what Bitname stack is.
>
>
>
>
> Am 23.01.2014 12:50, schrieb Alexandre Rafalovitch:
>> You are not doing this on a download distribution, do you? You are
>> using Bitnami stack or something. That's why you are not seeing the
>> examples folder, etc.
>>
>> I recommend step back, use downloaded distribution and do your
>> learning and setup using that. Then, go and see where your production
>> stack put various bits of Solr. Otherwise, you are doing two (15?)
>> things at once.
>>
>> Regards,
>>    Alex.
>> P.s. If you like the examples, the book actually explains what they
>> do. You could be quarter way to mastery in less than 24 hours...
>> Personal website: http://www.outerthoughts.com/
>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>> - Time is the quality of nature that keeps events from happening all
>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>> book)
>>
>>
>> On Thu, Jan 23, 2014 at 6:38 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>> Thanks a lot,
>>> those are great examples. I managed to get my cores working. What I
>>> noticed so far is that the first (auto-created) core is symlinking files
>>> to /etc/solr/...  or to /var/lib/solr/...
>>>
>>> I now am not sure where my self made-collections should be. Shall I
>>> create folders in /usr/share/solr/<collection-folder> and symlink to my
>>> files in /etc/solr or can I have hard-copies in my collection-folders?
>>> Is /usr/share/solr/ a good place for my collection-folders at all?
>>>
>>>
>>>
>>> Am 23.01.2014 12:16, schrieb Alexandre Rafalovitch:
>>>> You need config-dir level schema.xml, and solrconfig.xml. For multiple
>>>> collections, you also need a top-level solr.xml. And unless the config
>>>> files a lot of references to other files, you need nothing else.
>>>>
>>>> For examples, check the example directory in the distribution. Or have
>>>> a look at examples from my book:
>>>> https://github.com/arafalov/solr-indexing-book/tree/master/published .
>>>> This shows the solr.xml that points at a lot of collections. The first
>>>> nearly minimal collection is collection1, but you can then explore
>>>> others for various degree of complexity.
>>>>
>>>> Regards,
>>>>    Alex.
>>>> Personal website: http://www.outerthoughts.com/
>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>> - Time is the quality of nature that keeps events from happening all
>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>> book)
>>>>
>>>>
>>>> On Thu, Jan 23, 2014 at 4:55 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>>>> So far, I successfully managed to create a core from my existing
>>>>> configuration by opening this URL in my browser:
>>>>>
>>>>> http://localhost:8080/solr/admin/cores?action=CREATE&name=glPrototypeCore&instanceDir=/etc/solr
>>>>>
>>>>> New status from http://localhost:8080/solr/admin/cores?action=STATUS is:
>>>>>
>>>>> <response>
>>>>> <lst name="responseHeader">
>>>>> <int name="status">0</int>
>>>>> <int name="QTime">4</int>
>>>>> </lst>
>>>>> <lst name="status">
>>>>> <lst name="">
>>>>> <str name="name"/>
>>>>> <str name="instanceDir">/usr/share/solr/./</str>
>>>>> <str name="dataDir">/var/lib/solr/data/</str>
>>>>> <date name="startTime">2014-01-23T08:42:39.087Z</date>
>>>>> <long name="uptime">3056197</long>
>>>>> <lst name="index">
>>>>> <int name="numDocs">4401029</int>
>>>>> <int name="maxDoc">4401029</int>
>>>>> <long name="version">1370010628806</long>
>>>>> <int name="segmentCount">12</int>
>>>>> <bool name="current">true</bool>
>>>>> <bool name="hasDeletions">false</bool>
>>>>> <str name="directory">
>>>>> org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
>>>>> lockFactory=org.apache.lucene.store.NativeFSLockFactory@77c58801
>>>>> </str>
>>>>> <date name="lastModified">2013-10-29T14:17:22Z</date>
>>>>> </lst>
>>>>> </lst>
>>>>> <lst name="glPrototypeCore">
>>>>> <str name="name">glPrototypeCore</str>
>>>>> <str name="instanceDir">/etc/solr/</str>
>>>>> <str name="dataDir">/var/lib/solr/data/</str>
>>>>> <date name="startTime">2014-01-23T09:29:30.019Z</date>
>>>>> <long name="uptime">245267</long>
>>>>> <lst name="index">
>>>>> <int name="numDocs">4401029</int>
>>>>> <int name="maxDoc">4401029</int>
>>>>> <long name="version">1370010628806</long>
>>>>> <int name="segmentCount">12</int>
>>>>> <bool name="current">true</bool>
>>>>> <bool name="hasDeletions">false</bool>
>>>>> <str name="directory">
>>>>> org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
>>>>> lockFactory=org.apache.lucene.store.NativeFSLockFactory@5ad83862
>>>>> </str>
>>>>> <date name="lastModified">2013-10-29T14:17:22Z</date>
>>>>> </lst>
>>>>> </lst>
>>>>> </lst>
>>>>> </response>
>>>>>
>>>>>
>>>>> From my understanding I now have an unnamed core and a core named
>>>>> "glPrototypeCore" which uses the same configuration.
>>>>>
>>>>> I copied the files data-config.xml, schema.xml into a new directory
>>>>> "/etc/solr/glinstance" and tried to create another core but this always
>>>>> throws me error 400. I even tried by adding the schema- and
>>>>> config-parameters with full path, but this did not lead to any
>>>>> difference. Also I don't understand what the "dataDir"-parameter is for.
>>>>> I could not find any data-directories in /etc/solr/ but the creation of
>>>>> the first core worked anyway.
>>>>>
>>>>> Can someone help? Is there any better place for my new
>>>>> instance-directory and what files do I really need?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Am 23.01.2014 10:10, schrieb Stavros Delisavas:
>>>>>> I didn't know that the "core"-term is associated with this use case. I
>>>>>> expected it to be some technical feature that allows to run more
>>>>>> solr-instances for better multithread-cpu-usage. For example to activate
>>>>>> two solr-cores when two cpu-cores are available on the server.
>>>>>>
>>>>>> So in general, I have the feeling that the term "core" is somewhat
>>>>>> confusing for solr-beginners like me.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Am 23.01.2014 09:54, schrieb Alexandre Rafalovitch:
>>>>>>> Which is why it is curious that you did not find it. Looking back at
>>>>>>> it now, do you have a suggestion of what could be improved to insure
>>>>>>> people find this easier in the future?
>>>>>>>
>>>>>>> Regards,
>>>>>>>    Alex.
>>>>>>> Personal website: http://www.outerthoughts.com/
>>>>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>>>>> - Time is the quality of nature that keeps events from happening all
>>>>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>>>>> book)
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jan 23, 2014 at 3:49 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>>>>>>> Thanks for the fast responses. Looks like exactly what I was looking for!
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Am 23.01.2014 09:46, schrieb Furkan KAMACI:
>>>>>>>>> Hi;
>>>>>>>>>
>>>>>>>>> Firstly you should read here and learn the terminology of Solr:
>>>>>>>>> http://wiki.apache.org/solr/SolrTerminology
>>>>>>>>>
>>>>>>>>> Thanks;
>>>>>>>>> Furkan KAMACI
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>
>>>>>>>>>
>>>>>>>>>> If you are not worried about them stepping on each other's toes
>>>>>>>>>> (performance, disk space, etc), just create multiple collections.
>>>>>>>>>> There are examples of that in standard distribution (e.g. badly named
>>>>>>>>>> example/multicore).
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>>   Alex.
>>>>>>>>>> Personal website: http://www.outerthoughts.com/
>>>>>>>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>>>>>>>> - Time is the quality of nature that keeps events from happening all
>>>>>>>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>>>>>>>> book)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
>>>>>>>>>> wrote:
>>>>>>>>>>> Dear Solr-Experts,
>>>>>>>>>>>
>>>>>>>>>>> I am using Solr for my current web-application on my server successfully.
>>>>>>>>>>> Now I would like to use it in my second web-application that is hosted
>>>>>>>>>>> on the same server. Is it possible in any way to create two independent
>>>>>>>>>>> instances/databases in Solr? I know that I could create another set of
>>>>>>>>>>> fields with alternated field names, but I would prefer to be independent
>>>>>>>>>>> on my field naming for all my projects.
>>>>>>>>>>>
>>>>>>>>>>> Also I would like to be able to have one state of my development version
>>>>>>>>>>> and one state of my production version on my server so that I can do
>>>>>>>>>>> tests on my development-state without interference on my
>>>>>>>>>> production-version.
>>>>>>>>>>> What is the best-practice to achieve this or how can this be done in
>>>>>>>>>>> general?
>>>>>>>>>>>
>>>>>>>>>>> I have searched google but could not get any usefull results because I
>>>>>>>>>>> don't even know what terms to search for with solr.
>>>>>>>>>>> A minimal-example would be most helpfull.
>>>>>>>>>>>
>>>>>>>>>>> Thanks a lot!
>>>>>>>>>>>
>>>>>>>>>>> Stavros
>

Re: How to use Solr for two different projects on one server

Posted by Stavros Delisavas <st...@delisavas.de>.
I installed solr via apt-get and followed the online tutorials that I
found to adjust the existing schema.xml and created dataconfig.xml the
way I needed them.

Was this the wrong approach? I don't know what Bitname stack is.




Am 23.01.2014 12:50, schrieb Alexandre Rafalovitch:
> You are not doing this on a download distribution, do you? You are
> using Bitnami stack or something. That's why you are not seeing the
> examples folder, etc.
>
> I recommend step back, use downloaded distribution and do your
> learning and setup using that. Then, go and see where your production
> stack put various bits of Solr. Otherwise, you are doing two (15?)
> things at once.
>
> Regards,
>    Alex.
> P.s. If you like the examples, the book actually explains what they
> do. You could be quarter way to mastery in less than 24 hours...
> Personal website: http://www.outerthoughts.com/
> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
> - Time is the quality of nature that keeps events from happening all
> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
> book)
>
>
> On Thu, Jan 23, 2014 at 6:38 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>> Thanks a lot,
>> those are great examples. I managed to get my cores working. What I
>> noticed so far is that the first (auto-created) core is symlinking files
>> to /etc/solr/...  or to /var/lib/solr/...
>>
>> I now am not sure where my self made-collections should be. Shall I
>> create folders in /usr/share/solr/<collection-folder> and symlink to my
>> files in /etc/solr or can I have hard-copies in my collection-folders?
>> Is /usr/share/solr/ a good place for my collection-folders at all?
>>
>>
>>
>> Am 23.01.2014 12:16, schrieb Alexandre Rafalovitch:
>>> You need config-dir level schema.xml, and solrconfig.xml. For multiple
>>> collections, you also need a top-level solr.xml. And unless the config
>>> files a lot of references to other files, you need nothing else.
>>>
>>> For examples, check the example directory in the distribution. Or have
>>> a look at examples from my book:
>>> https://github.com/arafalov/solr-indexing-book/tree/master/published .
>>> This shows the solr.xml that points at a lot of collections. The first
>>> nearly minimal collection is collection1, but you can then explore
>>> others for various degree of complexity.
>>>
>>> Regards,
>>>    Alex.
>>> Personal website: http://www.outerthoughts.com/
>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>> - Time is the quality of nature that keeps events from happening all
>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>> book)
>>>
>>>
>>> On Thu, Jan 23, 2014 at 4:55 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>>> So far, I successfully managed to create a core from my existing
>>>> configuration by opening this URL in my browser:
>>>>
>>>> http://localhost:8080/solr/admin/cores?action=CREATE&name=glPrototypeCore&instanceDir=/etc/solr
>>>>
>>>> New status from http://localhost:8080/solr/admin/cores?action=STATUS is:
>>>>
>>>> <response>
>>>> <lst name="responseHeader">
>>>> <int name="status">0</int>
>>>> <int name="QTime">4</int>
>>>> </lst>
>>>> <lst name="status">
>>>> <lst name="">
>>>> <str name="name"/>
>>>> <str name="instanceDir">/usr/share/solr/./</str>
>>>> <str name="dataDir">/var/lib/solr/data/</str>
>>>> <date name="startTime">2014-01-23T08:42:39.087Z</date>
>>>> <long name="uptime">3056197</long>
>>>> <lst name="index">
>>>> <int name="numDocs">4401029</int>
>>>> <int name="maxDoc">4401029</int>
>>>> <long name="version">1370010628806</long>
>>>> <int name="segmentCount">12</int>
>>>> <bool name="current">true</bool>
>>>> <bool name="hasDeletions">false</bool>
>>>> <str name="directory">
>>>> org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
>>>> lockFactory=org.apache.lucene.store.NativeFSLockFactory@77c58801
>>>> </str>
>>>> <date name="lastModified">2013-10-29T14:17:22Z</date>
>>>> </lst>
>>>> </lst>
>>>> <lst name="glPrototypeCore">
>>>> <str name="name">glPrototypeCore</str>
>>>> <str name="instanceDir">/etc/solr/</str>
>>>> <str name="dataDir">/var/lib/solr/data/</str>
>>>> <date name="startTime">2014-01-23T09:29:30.019Z</date>
>>>> <long name="uptime">245267</long>
>>>> <lst name="index">
>>>> <int name="numDocs">4401029</int>
>>>> <int name="maxDoc">4401029</int>
>>>> <long name="version">1370010628806</long>
>>>> <int name="segmentCount">12</int>
>>>> <bool name="current">true</bool>
>>>> <bool name="hasDeletions">false</bool>
>>>> <str name="directory">
>>>> org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
>>>> lockFactory=org.apache.lucene.store.NativeFSLockFactory@5ad83862
>>>> </str>
>>>> <date name="lastModified">2013-10-29T14:17:22Z</date>
>>>> </lst>
>>>> </lst>
>>>> </lst>
>>>> </response>
>>>>
>>>>
>>>> From my understanding I now have an unnamed core and a core named
>>>> "glPrototypeCore" which uses the same configuration.
>>>>
>>>> I copied the files data-config.xml, schema.xml into a new directory
>>>> "/etc/solr/glinstance" and tried to create another core but this always
>>>> throws me error 400. I even tried by adding the schema- and
>>>> config-parameters with full path, but this did not lead to any
>>>> difference. Also I don't understand what the "dataDir"-parameter is for.
>>>> I could not find any data-directories in /etc/solr/ but the creation of
>>>> the first core worked anyway.
>>>>
>>>> Can someone help? Is there any better place for my new
>>>> instance-directory and what files do I really need?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Am 23.01.2014 10:10, schrieb Stavros Delisavas:
>>>>> I didn't know that the "core"-term is associated with this use case. I
>>>>> expected it to be some technical feature that allows to run more
>>>>> solr-instances for better multithread-cpu-usage. For example to activate
>>>>> two solr-cores when two cpu-cores are available on the server.
>>>>>
>>>>> So in general, I have the feeling that the term "core" is somewhat
>>>>> confusing for solr-beginners like me.
>>>>>
>>>>>
>>>>>
>>>>> Am 23.01.2014 09:54, schrieb Alexandre Rafalovitch:
>>>>>> Which is why it is curious that you did not find it. Looking back at
>>>>>> it now, do you have a suggestion of what could be improved to insure
>>>>>> people find this easier in the future?
>>>>>>
>>>>>> Regards,
>>>>>>    Alex.
>>>>>> Personal website: http://www.outerthoughts.com/
>>>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>>>> - Time is the quality of nature that keeps events from happening all
>>>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>>>> book)
>>>>>>
>>>>>>
>>>>>> On Thu, Jan 23, 2014 at 3:49 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>>>>>> Thanks for the fast responses. Looks like exactly what I was looking for!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Am 23.01.2014 09:46, schrieb Furkan KAMACI:
>>>>>>>> Hi;
>>>>>>>>
>>>>>>>> Firstly you should read here and learn the terminology of Solr:
>>>>>>>> http://wiki.apache.org/solr/SolrTerminology
>>>>>>>>
>>>>>>>> Thanks;
>>>>>>>> Furkan KAMACI
>>>>>>>>
>>>>>>>>
>>>>>>>> 2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>
>>>>>>>>
>>>>>>>>> If you are not worried about them stepping on each other's toes
>>>>>>>>> (performance, disk space, etc), just create multiple collections.
>>>>>>>>> There are examples of that in standard distribution (e.g. badly named
>>>>>>>>> example/multicore).
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>   Alex.
>>>>>>>>> Personal website: http://www.outerthoughts.com/
>>>>>>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>>>>>>> - Time is the quality of nature that keeps events from happening all
>>>>>>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>>>>>>> book)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
>>>>>>>>> wrote:
>>>>>>>>>> Dear Solr-Experts,
>>>>>>>>>>
>>>>>>>>>> I am using Solr for my current web-application on my server successfully.
>>>>>>>>>> Now I would like to use it in my second web-application that is hosted
>>>>>>>>>> on the same server. Is it possible in any way to create two independent
>>>>>>>>>> instances/databases in Solr? I know that I could create another set of
>>>>>>>>>> fields with alternated field names, but I would prefer to be independent
>>>>>>>>>> on my field naming for all my projects.
>>>>>>>>>>
>>>>>>>>>> Also I would like to be able to have one state of my development version
>>>>>>>>>> and one state of my production version on my server so that I can do
>>>>>>>>>> tests on my development-state without interference on my
>>>>>>>>> production-version.
>>>>>>>>>> What is the best-practice to achieve this or how can this be done in
>>>>>>>>>> general?
>>>>>>>>>>
>>>>>>>>>> I have searched google but could not get any usefull results because I
>>>>>>>>>> don't even know what terms to search for with solr.
>>>>>>>>>> A minimal-example would be most helpfull.
>>>>>>>>>>
>>>>>>>>>> Thanks a lot!
>>>>>>>>>>
>>>>>>>>>> Stavros


Re: How to use Solr for two different projects on one server

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
You are not doing this on a download distribution, do you? You are
using Bitnami stack or something. That's why you are not seeing the
examples folder, etc.

I recommend step back, use downloaded distribution and do your
learning and setup using that. Then, go and see where your production
stack put various bits of Solr. Otherwise, you are doing two (15?)
things at once.

Regards,
   Alex.
P.s. If you like the examples, the book actually explains what they
do. You could be quarter way to mastery in less than 24 hours...
Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Thu, Jan 23, 2014 at 6:38 PM, Stavros Delisavas <st...@delisavas.de> wrote:
> Thanks a lot,
> those are great examples. I managed to get my cores working. What I
> noticed so far is that the first (auto-created) core is symlinking files
> to /etc/solr/...  or to /var/lib/solr/...
>
> I now am not sure where my self made-collections should be. Shall I
> create folders in /usr/share/solr/<collection-folder> and symlink to my
> files in /etc/solr or can I have hard-copies in my collection-folders?
> Is /usr/share/solr/ a good place for my collection-folders at all?
>
>
>
> Am 23.01.2014 12:16, schrieb Alexandre Rafalovitch:
>> You need config-dir level schema.xml, and solrconfig.xml. For multiple
>> collections, you also need a top-level solr.xml. And unless the config
>> files a lot of references to other files, you need nothing else.
>>
>> For examples, check the example directory in the distribution. Or have
>> a look at examples from my book:
>> https://github.com/arafalov/solr-indexing-book/tree/master/published .
>> This shows the solr.xml that points at a lot of collections. The first
>> nearly minimal collection is collection1, but you can then explore
>> others for various degree of complexity.
>>
>> Regards,
>>    Alex.
>> Personal website: http://www.outerthoughts.com/
>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>> - Time is the quality of nature that keeps events from happening all
>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>> book)
>>
>>
>> On Thu, Jan 23, 2014 at 4:55 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>> So far, I successfully managed to create a core from my existing
>>> configuration by opening this URL in my browser:
>>>
>>> http://localhost:8080/solr/admin/cores?action=CREATE&name=glPrototypeCore&instanceDir=/etc/solr
>>>
>>> New status from http://localhost:8080/solr/admin/cores?action=STATUS is:
>>>
>>> <response>
>>> <lst name="responseHeader">
>>> <int name="status">0</int>
>>> <int name="QTime">4</int>
>>> </lst>
>>> <lst name="status">
>>> <lst name="">
>>> <str name="name"/>
>>> <str name="instanceDir">/usr/share/solr/./</str>
>>> <str name="dataDir">/var/lib/solr/data/</str>
>>> <date name="startTime">2014-01-23T08:42:39.087Z</date>
>>> <long name="uptime">3056197</long>
>>> <lst name="index">
>>> <int name="numDocs">4401029</int>
>>> <int name="maxDoc">4401029</int>
>>> <long name="version">1370010628806</long>
>>> <int name="segmentCount">12</int>
>>> <bool name="current">true</bool>
>>> <bool name="hasDeletions">false</bool>
>>> <str name="directory">
>>> org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
>>> lockFactory=org.apache.lucene.store.NativeFSLockFactory@77c58801
>>> </str>
>>> <date name="lastModified">2013-10-29T14:17:22Z</date>
>>> </lst>
>>> </lst>
>>> <lst name="glPrototypeCore">
>>> <str name="name">glPrototypeCore</str>
>>> <str name="instanceDir">/etc/solr/</str>
>>> <str name="dataDir">/var/lib/solr/data/</str>
>>> <date name="startTime">2014-01-23T09:29:30.019Z</date>
>>> <long name="uptime">245267</long>
>>> <lst name="index">
>>> <int name="numDocs">4401029</int>
>>> <int name="maxDoc">4401029</int>
>>> <long name="version">1370010628806</long>
>>> <int name="segmentCount">12</int>
>>> <bool name="current">true</bool>
>>> <bool name="hasDeletions">false</bool>
>>> <str name="directory">
>>> org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
>>> lockFactory=org.apache.lucene.store.NativeFSLockFactory@5ad83862
>>> </str>
>>> <date name="lastModified">2013-10-29T14:17:22Z</date>
>>> </lst>
>>> </lst>
>>> </lst>
>>> </response>
>>>
>>>
>>> From my understanding I now have an unnamed core and a core named
>>> "glPrototypeCore" which uses the same configuration.
>>>
>>> I copied the files data-config.xml, schema.xml into a new directory
>>> "/etc/solr/glinstance" and tried to create another core but this always
>>> throws me error 400. I even tried by adding the schema- and
>>> config-parameters with full path, but this did not lead to any
>>> difference. Also I don't understand what the "dataDir"-parameter is for.
>>> I could not find any data-directories in /etc/solr/ but the creation of
>>> the first core worked anyway.
>>>
>>> Can someone help? Is there any better place for my new
>>> instance-directory and what files do I really need?
>>>
>>>
>>>
>>>
>>>
>>> Am 23.01.2014 10:10, schrieb Stavros Delisavas:
>>>> I didn't know that the "core"-term is associated with this use case. I
>>>> expected it to be some technical feature that allows to run more
>>>> solr-instances for better multithread-cpu-usage. For example to activate
>>>> two solr-cores when two cpu-cores are available on the server.
>>>>
>>>> So in general, I have the feeling that the term "core" is somewhat
>>>> confusing for solr-beginners like me.
>>>>
>>>>
>>>>
>>>> Am 23.01.2014 09:54, schrieb Alexandre Rafalovitch:
>>>>> Which is why it is curious that you did not find it. Looking back at
>>>>> it now, do you have a suggestion of what could be improved to insure
>>>>> people find this easier in the future?
>>>>>
>>>>> Regards,
>>>>>    Alex.
>>>>> Personal website: http://www.outerthoughts.com/
>>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>>> - Time is the quality of nature that keeps events from happening all
>>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>>> book)
>>>>>
>>>>>
>>>>> On Thu, Jan 23, 2014 at 3:49 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>>>>> Thanks for the fast responses. Looks like exactly what I was looking for!
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Am 23.01.2014 09:46, schrieb Furkan KAMACI:
>>>>>>> Hi;
>>>>>>>
>>>>>>> Firstly you should read here and learn the terminology of Solr:
>>>>>>> http://wiki.apache.org/solr/SolrTerminology
>>>>>>>
>>>>>>> Thanks;
>>>>>>> Furkan KAMACI
>>>>>>>
>>>>>>>
>>>>>>> 2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>
>>>>>>>
>>>>>>>> If you are not worried about them stepping on each other's toes
>>>>>>>> (performance, disk space, etc), just create multiple collections.
>>>>>>>> There are examples of that in standard distribution (e.g. badly named
>>>>>>>> example/multicore).
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>   Alex.
>>>>>>>> Personal website: http://www.outerthoughts.com/
>>>>>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>>>>>> - Time is the quality of nature that keeps events from happening all
>>>>>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>>>>>> book)
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
>>>>>>>> wrote:
>>>>>>>>> Dear Solr-Experts,
>>>>>>>>>
>>>>>>>>> I am using Solr for my current web-application on my server successfully.
>>>>>>>>> Now I would like to use it in my second web-application that is hosted
>>>>>>>>> on the same server. Is it possible in any way to create two independent
>>>>>>>>> instances/databases in Solr? I know that I could create another set of
>>>>>>>>> fields with alternated field names, but I would prefer to be independent
>>>>>>>>> on my field naming for all my projects.
>>>>>>>>>
>>>>>>>>> Also I would like to be able to have one state of my development version
>>>>>>>>> and one state of my production version on my server so that I can do
>>>>>>>>> tests on my development-state without interference on my
>>>>>>>> production-version.
>>>>>>>>> What is the best-practice to achieve this or how can this be done in
>>>>>>>>> general?
>>>>>>>>>
>>>>>>>>> I have searched google but could not get any usefull results because I
>>>>>>>>> don't even know what terms to search for with solr.
>>>>>>>>> A minimal-example would be most helpfull.
>>>>>>>>>
>>>>>>>>> Thanks a lot!
>>>>>>>>>
>>>>>>>>> Stavros
>

Re: How to use Solr for two different projects on one server

Posted by Stavros Delisavas <st...@delisavas.de>.
Thanks a lot,
those are great examples. I managed to get my cores working. What I
noticed so far is that the first (auto-created) core is symlinking files
to /etc/solr/...  or to /var/lib/solr/...

I now am not sure where my self made-collections should be. Shall I
create folders in /usr/share/solr/<collection-folder> and symlink to my
files in /etc/solr or can I have hard-copies in my collection-folders?
Is /usr/share/solr/ a good place for my collection-folders at all?



Am 23.01.2014 12:16, schrieb Alexandre Rafalovitch:
> You need config-dir level schema.xml, and solrconfig.xml. For multiple
> collections, you also need a top-level solr.xml. And unless the config
> files a lot of references to other files, you need nothing else.
>
> For examples, check the example directory in the distribution. Or have
> a look at examples from my book:
> https://github.com/arafalov/solr-indexing-book/tree/master/published .
> This shows the solr.xml that points at a lot of collections. The first
> nearly minimal collection is collection1, but you can then explore
> others for various degree of complexity.
>
> Regards,
>    Alex.
> Personal website: http://www.outerthoughts.com/
> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
> - Time is the quality of nature that keeps events from happening all
> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
> book)
>
>
> On Thu, Jan 23, 2014 at 4:55 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>> So far, I successfully managed to create a core from my existing
>> configuration by opening this URL in my browser:
>>
>> http://localhost:8080/solr/admin/cores?action=CREATE&name=glPrototypeCore&instanceDir=/etc/solr
>>
>> New status from http://localhost:8080/solr/admin/cores?action=STATUS is:
>>
>> <response>
>> <lst name="responseHeader">
>> <int name="status">0</int>
>> <int name="QTime">4</int>
>> </lst>
>> <lst name="status">
>> <lst name="">
>> <str name="name"/>
>> <str name="instanceDir">/usr/share/solr/./</str>
>> <str name="dataDir">/var/lib/solr/data/</str>
>> <date name="startTime">2014-01-23T08:42:39.087Z</date>
>> <long name="uptime">3056197</long>
>> <lst name="index">
>> <int name="numDocs">4401029</int>
>> <int name="maxDoc">4401029</int>
>> <long name="version">1370010628806</long>
>> <int name="segmentCount">12</int>
>> <bool name="current">true</bool>
>> <bool name="hasDeletions">false</bool>
>> <str name="directory">
>> org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
>> lockFactory=org.apache.lucene.store.NativeFSLockFactory@77c58801
>> </str>
>> <date name="lastModified">2013-10-29T14:17:22Z</date>
>> </lst>
>> </lst>
>> <lst name="glPrototypeCore">
>> <str name="name">glPrototypeCore</str>
>> <str name="instanceDir">/etc/solr/</str>
>> <str name="dataDir">/var/lib/solr/data/</str>
>> <date name="startTime">2014-01-23T09:29:30.019Z</date>
>> <long name="uptime">245267</long>
>> <lst name="index">
>> <int name="numDocs">4401029</int>
>> <int name="maxDoc">4401029</int>
>> <long name="version">1370010628806</long>
>> <int name="segmentCount">12</int>
>> <bool name="current">true</bool>
>> <bool name="hasDeletions">false</bool>
>> <str name="directory">
>> org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
>> lockFactory=org.apache.lucene.store.NativeFSLockFactory@5ad83862
>> </str>
>> <date name="lastModified">2013-10-29T14:17:22Z</date>
>> </lst>
>> </lst>
>> </lst>
>> </response>
>>
>>
>> From my understanding I now have an unnamed core and a core named
>> "glPrototypeCore" which uses the same configuration.
>>
>> I copied the files data-config.xml, schema.xml into a new directory
>> "/etc/solr/glinstance" and tried to create another core but this always
>> throws me error 400. I even tried by adding the schema- and
>> config-parameters with full path, but this did not lead to any
>> difference. Also I don't understand what the "dataDir"-parameter is for.
>> I could not find any data-directories in /etc/solr/ but the creation of
>> the first core worked anyway.
>>
>> Can someone help? Is there any better place for my new
>> instance-directory and what files do I really need?
>>
>>
>>
>>
>>
>> Am 23.01.2014 10:10, schrieb Stavros Delisavas:
>>> I didn't know that the "core"-term is associated with this use case. I
>>> expected it to be some technical feature that allows to run more
>>> solr-instances for better multithread-cpu-usage. For example to activate
>>> two solr-cores when two cpu-cores are available on the server.
>>>
>>> So in general, I have the feeling that the term "core" is somewhat
>>> confusing for solr-beginners like me.
>>>
>>>
>>>
>>> Am 23.01.2014 09:54, schrieb Alexandre Rafalovitch:
>>>> Which is why it is curious that you did not find it. Looking back at
>>>> it now, do you have a suggestion of what could be improved to insure
>>>> people find this easier in the future?
>>>>
>>>> Regards,
>>>>    Alex.
>>>> Personal website: http://www.outerthoughts.com/
>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>> - Time is the quality of nature that keeps events from happening all
>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>> book)
>>>>
>>>>
>>>> On Thu, Jan 23, 2014 at 3:49 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>>>> Thanks for the fast responses. Looks like exactly what I was looking for!
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Am 23.01.2014 09:46, schrieb Furkan KAMACI:
>>>>>> Hi;
>>>>>>
>>>>>> Firstly you should read here and learn the terminology of Solr:
>>>>>> http://wiki.apache.org/solr/SolrTerminology
>>>>>>
>>>>>> Thanks;
>>>>>> Furkan KAMACI
>>>>>>
>>>>>>
>>>>>> 2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>
>>>>>>
>>>>>>> If you are not worried about them stepping on each other's toes
>>>>>>> (performance, disk space, etc), just create multiple collections.
>>>>>>> There are examples of that in standard distribution (e.g. badly named
>>>>>>> example/multicore).
>>>>>>>
>>>>>>> Regards,
>>>>>>>   Alex.
>>>>>>> Personal website: http://www.outerthoughts.com/
>>>>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>>>>> - Time is the quality of nature that keeps events from happening all
>>>>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>>>>> book)
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
>>>>>>> wrote:
>>>>>>>> Dear Solr-Experts,
>>>>>>>>
>>>>>>>> I am using Solr for my current web-application on my server successfully.
>>>>>>>> Now I would like to use it in my second web-application that is hosted
>>>>>>>> on the same server. Is it possible in any way to create two independent
>>>>>>>> instances/databases in Solr? I know that I could create another set of
>>>>>>>> fields with alternated field names, but I would prefer to be independent
>>>>>>>> on my field naming for all my projects.
>>>>>>>>
>>>>>>>> Also I would like to be able to have one state of my development version
>>>>>>>> and one state of my production version on my server so that I can do
>>>>>>>> tests on my development-state without interference on my
>>>>>>> production-version.
>>>>>>>> What is the best-practice to achieve this or how can this be done in
>>>>>>>> general?
>>>>>>>>
>>>>>>>> I have searched google but could not get any usefull results because I
>>>>>>>> don't even know what terms to search for with solr.
>>>>>>>> A minimal-example would be most helpfull.
>>>>>>>>
>>>>>>>> Thanks a lot!
>>>>>>>>
>>>>>>>> Stavros


Re: How to use Solr for two different projects on one server

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
You need config-dir level schema.xml, and solrconfig.xml. For multiple
collections, you also need a top-level solr.xml. And unless the config
files a lot of references to other files, you need nothing else.

For examples, check the example directory in the distribution. Or have
a look at examples from my book:
https://github.com/arafalov/solr-indexing-book/tree/master/published .
This shows the solr.xml that points at a lot of collections. The first
nearly minimal collection is collection1, but you can then explore
others for various degree of complexity.

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Thu, Jan 23, 2014 at 4:55 PM, Stavros Delisavas <st...@delisavas.de> wrote:
> So far, I successfully managed to create a core from my existing
> configuration by opening this URL in my browser:
>
> http://localhost:8080/solr/admin/cores?action=CREATE&name=glPrototypeCore&instanceDir=/etc/solr
>
> New status from http://localhost:8080/solr/admin/cores?action=STATUS is:
>
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">4</int>
> </lst>
> <lst name="status">
> <lst name="">
> <str name="name"/>
> <str name="instanceDir">/usr/share/solr/./</str>
> <str name="dataDir">/var/lib/solr/data/</str>
> <date name="startTime">2014-01-23T08:42:39.087Z</date>
> <long name="uptime">3056197</long>
> <lst name="index">
> <int name="numDocs">4401029</int>
> <int name="maxDoc">4401029</int>
> <long name="version">1370010628806</long>
> <int name="segmentCount">12</int>
> <bool name="current">true</bool>
> <bool name="hasDeletions">false</bool>
> <str name="directory">
> org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
> lockFactory=org.apache.lucene.store.NativeFSLockFactory@77c58801
> </str>
> <date name="lastModified">2013-10-29T14:17:22Z</date>
> </lst>
> </lst>
> <lst name="glPrototypeCore">
> <str name="name">glPrototypeCore</str>
> <str name="instanceDir">/etc/solr/</str>
> <str name="dataDir">/var/lib/solr/data/</str>
> <date name="startTime">2014-01-23T09:29:30.019Z</date>
> <long name="uptime">245267</long>
> <lst name="index">
> <int name="numDocs">4401029</int>
> <int name="maxDoc">4401029</int>
> <long name="version">1370010628806</long>
> <int name="segmentCount">12</int>
> <bool name="current">true</bool>
> <bool name="hasDeletions">false</bool>
> <str name="directory">
> org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
> lockFactory=org.apache.lucene.store.NativeFSLockFactory@5ad83862
> </str>
> <date name="lastModified">2013-10-29T14:17:22Z</date>
> </lst>
> </lst>
> </lst>
> </response>
>
>
> From my understanding I now have an unnamed core and a core named
> "glPrototypeCore" which uses the same configuration.
>
> I copied the files data-config.xml, schema.xml into a new directory
> "/etc/solr/glinstance" and tried to create another core but this always
> throws me error 400. I even tried by adding the schema- and
> config-parameters with full path, but this did not lead to any
> difference. Also I don't understand what the "dataDir"-parameter is for.
> I could not find any data-directories in /etc/solr/ but the creation of
> the first core worked anyway.
>
> Can someone help? Is there any better place for my new
> instance-directory and what files do I really need?
>
>
>
>
>
> Am 23.01.2014 10:10, schrieb Stavros Delisavas:
>> I didn't know that the "core"-term is associated with this use case. I
>> expected it to be some technical feature that allows to run more
>> solr-instances for better multithread-cpu-usage. For example to activate
>> two solr-cores when two cpu-cores are available on the server.
>>
>> So in general, I have the feeling that the term "core" is somewhat
>> confusing for solr-beginners like me.
>>
>>
>>
>> Am 23.01.2014 09:54, schrieb Alexandre Rafalovitch:
>>> Which is why it is curious that you did not find it. Looking back at
>>> it now, do you have a suggestion of what could be improved to insure
>>> people find this easier in the future?
>>>
>>> Regards,
>>>    Alex.
>>> Personal website: http://www.outerthoughts.com/
>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>> - Time is the quality of nature that keeps events from happening all
>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>> book)
>>>
>>>
>>> On Thu, Jan 23, 2014 at 3:49 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>>> Thanks for the fast responses. Looks like exactly what I was looking for!
>>>>
>>>>
>>>>
>>>>
>>>> Am 23.01.2014 09:46, schrieb Furkan KAMACI:
>>>>> Hi;
>>>>>
>>>>> Firstly you should read here and learn the terminology of Solr:
>>>>> http://wiki.apache.org/solr/SolrTerminology
>>>>>
>>>>> Thanks;
>>>>> Furkan KAMACI
>>>>>
>>>>>
>>>>> 2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>
>>>>>
>>>>>> If you are not worried about them stepping on each other's toes
>>>>>> (performance, disk space, etc), just create multiple collections.
>>>>>> There are examples of that in standard distribution (e.g. badly named
>>>>>> example/multicore).
>>>>>>
>>>>>> Regards,
>>>>>>   Alex.
>>>>>> Personal website: http://www.outerthoughts.com/
>>>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>>>> - Time is the quality of nature that keeps events from happening all
>>>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>>>> book)
>>>>>>
>>>>>>
>>>>>> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
>>>>>> wrote:
>>>>>>> Dear Solr-Experts,
>>>>>>>
>>>>>>> I am using Solr for my current web-application on my server successfully.
>>>>>>> Now I would like to use it in my second web-application that is hosted
>>>>>>> on the same server. Is it possible in any way to create two independent
>>>>>>> instances/databases in Solr? I know that I could create another set of
>>>>>>> fields with alternated field names, but I would prefer to be independent
>>>>>>> on my field naming for all my projects.
>>>>>>>
>>>>>>> Also I would like to be able to have one state of my development version
>>>>>>> and one state of my production version on my server so that I can do
>>>>>>> tests on my development-state without interference on my
>>>>>> production-version.
>>>>>>> What is the best-practice to achieve this or how can this be done in
>>>>>>> general?
>>>>>>>
>>>>>>> I have searched google but could not get any usefull results because I
>>>>>>> don't even know what terms to search for with solr.
>>>>>>> A minimal-example would be most helpfull.
>>>>>>>
>>>>>>> Thanks a lot!
>>>>>>>
>>>>>>> Stavros
>

Re: How to use Solr for two different projects on one server

Posted by Stavros Delisavas <st...@delisavas.de>.
So far, I successfully managed to create a core from my existing
configuration by opening this URL in my browser:

http://localhost:8080/solr/admin/cores?action=CREATE&name=glPrototypeCore&instanceDir=/etc/solr

New status from http://localhost:8080/solr/admin/cores?action=STATUS is:

<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">4</int>
</lst>
<lst name="status">
<lst name="">
<str name="name"/>
<str name="instanceDir">/usr/share/solr/./</str>
<str name="dataDir">/var/lib/solr/data/</str>
<date name="startTime">2014-01-23T08:42:39.087Z</date>
<long name="uptime">3056197</long>
<lst name="index">
<int name="numDocs">4401029</int>
<int name="maxDoc">4401029</int>
<long name="version">1370010628806</long>
<int name="segmentCount">12</int>
<bool name="current">true</bool>
<bool name="hasDeletions">false</bool>
<str name="directory">
org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
lockFactory=org.apache.lucene.store.NativeFSLockFactory@77c58801
</str>
<date name="lastModified">2013-10-29T14:17:22Z</date>
</lst>
</lst>
<lst name="glPrototypeCore">
<str name="name">glPrototypeCore</str>
<str name="instanceDir">/etc/solr/</str>
<str name="dataDir">/var/lib/solr/data/</str>
<date name="startTime">2014-01-23T09:29:30.019Z</date>
<long name="uptime">245267</long>
<lst name="index">
<int name="numDocs">4401029</int>
<int name="maxDoc">4401029</int>
<long name="version">1370010628806</long>
<int name="segmentCount">12</int>
<bool name="current">true</bool>
<bool name="hasDeletions">false</bool>
<str name="directory">
org.apache.lucene.store.MMapDirectory:org.apache.lucene.store.MMapDirectory@/var/lib/solr/data/index
lockFactory=org.apache.lucene.store.NativeFSLockFactory@5ad83862
</str>
<date name="lastModified">2013-10-29T14:17:22Z</date>
</lst>
</lst>
</lst>
</response>


>From my understanding I now have an unnamed core and a core named
"glPrototypeCore" which uses the same configuration.

I copied the files data-config.xml, schema.xml into a new directory
"/etc/solr/glinstance" and tried to create another core but this always
throws me error 400. I even tried by adding the schema- and
config-parameters with full path, but this did not lead to any
difference. Also I don't understand what the "dataDir"-parameter is for.
I could not find any data-directories in /etc/solr/ but the creation of
the first core worked anyway.

Can someone help? Is there any better place for my new
instance-directory and what files do I really need?





Am 23.01.2014 10:10, schrieb Stavros Delisavas:
> I didn't know that the "core"-term is associated with this use case. I
> expected it to be some technical feature that allows to run more
> solr-instances for better multithread-cpu-usage. For example to activate
> two solr-cores when two cpu-cores are available on the server.
>
> So in general, I have the feeling that the term "core" is somewhat
> confusing for solr-beginners like me.
>
>
>
> Am 23.01.2014 09:54, schrieb Alexandre Rafalovitch:
>> Which is why it is curious that you did not find it. Looking back at
>> it now, do you have a suggestion of what could be improved to insure
>> people find this easier in the future?
>>
>> Regards,
>>    Alex.
>> Personal website: http://www.outerthoughts.com/
>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>> - Time is the quality of nature that keeps events from happening all
>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>> book)
>>
>>
>> On Thu, Jan 23, 2014 at 3:49 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>>> Thanks for the fast responses. Looks like exactly what I was looking for!
>>>
>>>
>>>
>>>
>>> Am 23.01.2014 09:46, schrieb Furkan KAMACI:
>>>> Hi;
>>>>
>>>> Firstly you should read here and learn the terminology of Solr:
>>>> http://wiki.apache.org/solr/SolrTerminology
>>>>
>>>> Thanks;
>>>> Furkan KAMACI
>>>>
>>>>
>>>> 2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>
>>>>
>>>>> If you are not worried about them stepping on each other's toes
>>>>> (performance, disk space, etc), just create multiple collections.
>>>>> There are examples of that in standard distribution (e.g. badly named
>>>>> example/multicore).
>>>>>
>>>>> Regards,
>>>>>   Alex.
>>>>> Personal website: http://www.outerthoughts.com/
>>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>>> - Time is the quality of nature that keeps events from happening all
>>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>>> book)
>>>>>
>>>>>
>>>>> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
>>>>> wrote:
>>>>>> Dear Solr-Experts,
>>>>>>
>>>>>> I am using Solr for my current web-application on my server successfully.
>>>>>> Now I would like to use it in my second web-application that is hosted
>>>>>> on the same server. Is it possible in any way to create two independent
>>>>>> instances/databases in Solr? I know that I could create another set of
>>>>>> fields with alternated field names, but I would prefer to be independent
>>>>>> on my field naming for all my projects.
>>>>>>
>>>>>> Also I would like to be able to have one state of my development version
>>>>>> and one state of my production version on my server so that I can do
>>>>>> tests on my development-state without interference on my
>>>>> production-version.
>>>>>> What is the best-practice to achieve this or how can this be done in
>>>>>> general?
>>>>>>
>>>>>> I have searched google but could not get any usefull results because I
>>>>>> don't even know what terms to search for with solr.
>>>>>> A minimal-example would be most helpfull.
>>>>>>
>>>>>> Thanks a lot!
>>>>>>
>>>>>> Stavros


Re: How to use Solr for two different projects on one server

Posted by Stavros Delisavas <st...@delisavas.de>.
I didn't know that the "core"-term is associated with this use case. I
expected it to be some technical feature that allows to run more
solr-instances for better multithread-cpu-usage. For example to activate
two solr-cores when two cpu-cores are available on the server.

So in general, I have the feeling that the term "core" is somewhat
confusing for solr-beginners like me.



Am 23.01.2014 09:54, schrieb Alexandre Rafalovitch:
> Which is why it is curious that you did not find it. Looking back at
> it now, do you have a suggestion of what could be improved to insure
> people find this easier in the future?
>
> Regards,
>    Alex.
> Personal website: http://www.outerthoughts.com/
> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
> - Time is the quality of nature that keeps events from happening all
> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
> book)
>
>
> On Thu, Jan 23, 2014 at 3:49 PM, Stavros Delisavas <st...@delisavas.de> wrote:
>> Thanks for the fast responses. Looks like exactly what I was looking for!
>>
>>
>>
>>
>> Am 23.01.2014 09:46, schrieb Furkan KAMACI:
>>> Hi;
>>>
>>> Firstly you should read here and learn the terminology of Solr:
>>> http://wiki.apache.org/solr/SolrTerminology
>>>
>>> Thanks;
>>> Furkan KAMACI
>>>
>>>
>>> 2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>
>>>
>>>> If you are not worried about them stepping on each other's toes
>>>> (performance, disk space, etc), just create multiple collections.
>>>> There are examples of that in standard distribution (e.g. badly named
>>>> example/multicore).
>>>>
>>>> Regards,
>>>>   Alex.
>>>> Personal website: http://www.outerthoughts.com/
>>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>>> - Time is the quality of nature that keeps events from happening all
>>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>>> book)
>>>>
>>>>
>>>> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
>>>> wrote:
>>>>> Dear Solr-Experts,
>>>>>
>>>>> I am using Solr for my current web-application on my server successfully.
>>>>> Now I would like to use it in my second web-application that is hosted
>>>>> on the same server. Is it possible in any way to create two independent
>>>>> instances/databases in Solr? I know that I could create another set of
>>>>> fields with alternated field names, but I would prefer to be independent
>>>>> on my field naming for all my projects.
>>>>>
>>>>> Also I would like to be able to have one state of my development version
>>>>> and one state of my production version on my server so that I can do
>>>>> tests on my development-state without interference on my
>>>> production-version.
>>>>> What is the best-practice to achieve this or how can this be done in
>>>>> general?
>>>>>
>>>>> I have searched google but could not get any usefull results because I
>>>>> don't even know what terms to search for with solr.
>>>>> A minimal-example would be most helpfull.
>>>>>
>>>>> Thanks a lot!
>>>>>
>>>>> Stavros


Re: How to use Solr for two different projects on one server

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Which is why it is curious that you did not find it. Looking back at
it now, do you have a suggestion of what could be improved to insure
people find this easier in the future?

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Thu, Jan 23, 2014 at 3:49 PM, Stavros Delisavas <st...@delisavas.de> wrote:
> Thanks for the fast responses. Looks like exactly what I was looking for!
>
>
>
>
> Am 23.01.2014 09:46, schrieb Furkan KAMACI:
>> Hi;
>>
>> Firstly you should read here and learn the terminology of Solr:
>> http://wiki.apache.org/solr/SolrTerminology
>>
>> Thanks;
>> Furkan KAMACI
>>
>>
>> 2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>
>>
>>> If you are not worried about them stepping on each other's toes
>>> (performance, disk space, etc), just create multiple collections.
>>> There are examples of that in standard distribution (e.g. badly named
>>> example/multicore).
>>>
>>> Regards,
>>>   Alex.
>>> Personal website: http://www.outerthoughts.com/
>>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>>> - Time is the quality of nature that keeps events from happening all
>>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>>> book)
>>>
>>>
>>> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
>>> wrote:
>>>> Dear Solr-Experts,
>>>>
>>>> I am using Solr for my current web-application on my server successfully.
>>>> Now I would like to use it in my second web-application that is hosted
>>>> on the same server. Is it possible in any way to create two independent
>>>> instances/databases in Solr? I know that I could create another set of
>>>> fields with alternated field names, but I would prefer to be independent
>>>> on my field naming for all my projects.
>>>>
>>>> Also I would like to be able to have one state of my development version
>>>> and one state of my production version on my server so that I can do
>>>> tests on my development-state without interference on my
>>> production-version.
>>>> What is the best-practice to achieve this or how can this be done in
>>>> general?
>>>>
>>>> I have searched google but could not get any usefull results because I
>>>> don't even know what terms to search for with solr.
>>>> A minimal-example would be most helpfull.
>>>>
>>>> Thanks a lot!
>>>>
>>>> Stavros
>

Re: How to use Solr for two different projects on one server

Posted by Stavros Delisavas <st...@delisavas.de>.
Thanks for the fast responses. Looks like exactly what I was looking for!




Am 23.01.2014 09:46, schrieb Furkan KAMACI:
> Hi;
>
> Firstly you should read here and learn the terminology of Solr:
> http://wiki.apache.org/solr/SolrTerminology
>
> Thanks;
> Furkan KAMACI
>
>
> 2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>
>
>> If you are not worried about them stepping on each other's toes
>> (performance, disk space, etc), just create multiple collections.
>> There are examples of that in standard distribution (e.g. badly named
>> example/multicore).
>>
>> Regards,
>>   Alex.
>> Personal website: http://www.outerthoughts.com/
>> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
>> - Time is the quality of nature that keeps events from happening all
>> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
>> book)
>>
>>
>> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
>> wrote:
>>> Dear Solr-Experts,
>>>
>>> I am using Solr for my current web-application on my server successfully.
>>> Now I would like to use it in my second web-application that is hosted
>>> on the same server. Is it possible in any way to create two independent
>>> instances/databases in Solr? I know that I could create another set of
>>> fields with alternated field names, but I would prefer to be independent
>>> on my field naming for all my projects.
>>>
>>> Also I would like to be able to have one state of my development version
>>> and one state of my production version on my server so that I can do
>>> tests on my development-state without interference on my
>> production-version.
>>> What is the best-practice to achieve this or how can this be done in
>>> general?
>>>
>>> I have searched google but could not get any usefull results because I
>>> don't even know what terms to search for with solr.
>>> A minimal-example would be most helpfull.
>>>
>>> Thanks a lot!
>>>
>>> Stavros


Re: How to use Solr for two different projects on one server

Posted by Furkan KAMACI <fu...@gmail.com>.
Hi;

Firstly you should read here and learn the terminology of Solr:
http://wiki.apache.org/solr/SolrTerminology

Thanks;
Furkan KAMACI


2014/1/23 Alexandre Rafalovitch <ar...@gmail.com>

> If you are not worried about them stepping on each other's toes
> (performance, disk space, etc), just create multiple collections.
> There are examples of that in standard distribution (e.g. badly named
> example/multicore).
>
> Regards,
>   Alex.
> Personal website: http://www.outerthoughts.com/
> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
> - Time is the quality of nature that keeps events from happening all
> at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
> book)
>
>
> On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de>
> wrote:
> > Dear Solr-Experts,
> >
> > I am using Solr for my current web-application on my server successfully.
> > Now I would like to use it in my second web-application that is hosted
> > on the same server. Is it possible in any way to create two independent
> > instances/databases in Solr? I know that I could create another set of
> > fields with alternated field names, but I would prefer to be independent
> > on my field naming for all my projects.
> >
> > Also I would like to be able to have one state of my development version
> > and one state of my production version on my server so that I can do
> > tests on my development-state without interference on my
> production-version.
> > What is the best-practice to achieve this or how can this be done in
> > general?
> >
> > I have searched google but could not get any usefull results because I
> > don't even know what terms to search for with solr.
> > A minimal-example would be most helpfull.
> >
> > Thanks a lot!
> >
> > Stavros
>

Re: How to use Solr for two different projects on one server

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
If you are not worried about them stepping on each other's toes
(performance, disk space, etc), just create multiple collections.
There are examples of that in standard distribution (e.g. badly named
example/multicore).

Regards,
  Alex.
Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Thu, Jan 23, 2014 at 3:36 PM, Stavros Delisavas <st...@delisavas.de> wrote:
> Dear Solr-Experts,
>
> I am using Solr for my current web-application on my server successfully.
> Now I would like to use it in my second web-application that is hosted
> on the same server. Is it possible in any way to create two independent
> instances/databases in Solr? I know that I could create another set of
> fields with alternated field names, but I would prefer to be independent
> on my field naming for all my projects.
>
> Also I would like to be able to have one state of my development version
> and one state of my production version on my server so that I can do
> tests on my development-state without interference on my production-version.
> What is the best-practice to achieve this or how can this be done in
> general?
>
> I have searched google but could not get any usefull results because I
> don't even know what terms to search for with solr.
> A minimal-example would be most helpfull.
>
> Thanks a lot!
>
> Stavros