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 Brendan Grainger <br...@gmail.com> on 2013/07/03 22:45:34 UTC

EmbeddedSolrServer for indexing

Hi,

I'm experimenting with indexing using the EmbeddedSolrServer. Just to be
sure, as I understand it, I do not need a running instance of solr to use
this, it literally is a running instance of solr.

Given the above, how safe is it to use an EmbeddedSolrServer for indexing
an index that might be simultaneously used by a regular running instance of
solr with clients communicating with it using the usual http interface?

Thanks
Brendan

Re: EmbeddedSolrServer for indexing

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
That sounds more feasible. Solr 4 does have support for swapping the core
over. The only issue is that you need to make sure you know which core is
active after restart. Solr can save the changes (mapping of core name to
directory) in solr.xml, but you need to ensure all the permissions are set
correctly.

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 Wed, Jul 3, 2013 at 6:52 PM, Brendan Grainger <brendan.grainger@gmail.com
> wrote:

> Awesome thanks. What about indexing in a different core then renaming it
> once its done?
>
> Thanks
> Brendan
>
> On Jul 3, 2013, at 6:48 PM, Shawn Heisey <so...@elyograg.org> wrote:
>
> > On 7/3/2013 2:45 PM, Brendan Grainger wrote:
> >> I'm experimenting with indexing using the EmbeddedSolrServer. Just to be
> >> sure, as I understand it, I do not need a running instance of solr to
> use
> >> this, it literally is a running instance of solr.
> >
> > You are correct, EmbeddedSolrServer starts a complete copy of Solr.
> >
> >> Given the above, how safe is it to use an EmbeddedSolrServer for
> indexing
> >> an index that might be simultaneously used by a regular running
> instance of
> >> solr with clients communicating with it using the usual http interface?
> >
> > This is a bad idea.  Due to the way that 3.x and earlier work, you might
> > be able to get away with it if you have an old version, but bad things
> > can happen.
> >
> > Version 4.x and later will try to obtain a write lock as soon as they
> > start, making it very hard to use the same index with more than one
> > instance of Solr.
> >
> > Thanks,
> > Shawn
> >
>

Re: EmbeddedSolrServer for indexing

Posted by Brendan Grainger <br...@gmail.com>.
Awesome thanks. What about indexing in a different core then renaming it once its done?

Thanks 
Brendan

On Jul 3, 2013, at 6:48 PM, Shawn Heisey <so...@elyograg.org> wrote:

> On 7/3/2013 2:45 PM, Brendan Grainger wrote:
>> I'm experimenting with indexing using the EmbeddedSolrServer. Just to be
>> sure, as I understand it, I do not need a running instance of solr to use
>> this, it literally is a running instance of solr.
> 
> You are correct, EmbeddedSolrServer starts a complete copy of Solr.
> 
>> Given the above, how safe is it to use an EmbeddedSolrServer for indexing
>> an index that might be simultaneously used by a regular running instance of
>> solr with clients communicating with it using the usual http interface?
> 
> This is a bad idea.  Due to the way that 3.x and earlier work, you might
> be able to get away with it if you have an old version, but bad things
> can happen.
> 
> Version 4.x and later will try to obtain a write lock as soon as they
> start, making it very hard to use the same index with more than one
> instance of Solr.
> 
> Thanks,
> Shawn
> 

Re: EmbeddedSolrServer for indexing

Posted by Shawn Heisey <so...@elyograg.org>.
On 7/3/2013 2:45 PM, Brendan Grainger wrote:
> I'm experimenting with indexing using the EmbeddedSolrServer. Just to be
> sure, as I understand it, I do not need a running instance of solr to use
> this, it literally is a running instance of solr.

You are correct, EmbeddedSolrServer starts a complete copy of Solr.

> Given the above, how safe is it to use an EmbeddedSolrServer for indexing
> an index that might be simultaneously used by a regular running instance of
> solr with clients communicating with it using the usual http interface?

This is a bad idea.  Due to the way that 3.x and earlier work, you might
be able to get away with it if you have an old version, but bad things
can happen.

Version 4.x and later will try to obtain a write lock as soon as they
start, making it very hard to use the same index with more than one
instance of Solr.

Thanks,
Shawn