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 S G <sg...@gmail.com> on 2017/08/24 18:15:26 UTC

Running Solr-Server inside other process

Hi,

We are looking to run Solr in-memory for testing and examples.

For example:
1) Cassandra has cassandra-unit:
https://github.com/jsevellec/cassandra-unit/wiki/How-to-use-it-in-your-code

2) Storm has local-mode:
http://storm.apache.org/releases/current/Local-mode.html

Is there something similar for Solr too?

Thanks
SG

Re: Running Solr-Server inside other process

Posted by Erick Erickson <er...@gmail.com>.
Take a look at the usages in Solr tests, and the class's constructor,
it's pretty straightforward. It extends SolrClient so once you create
one you can use it as you would connecting to a remote Solr server.

Note that the core you specify for some of the c'tors is the
_default_, you can use EmbeddedSolrServer with multiple cores.

Best,
Erick

On Sun, Aug 27, 2017 at 8:22 AM, S G <sg...@gmail.com> wrote:
> Thanks Erick,
>
> Yes, this seems to be what I want.
> Is there a good example of how to use it?
>
> Thanks
> SG
>
>
> On Thu, Aug 24, 2017 at 5:02 PM, Erick Erickson <er...@gmail.com>
> wrote:
>
>> Solr has the EmbeddedSolrServer is that what you're looking for?
>>
>> Best,
>> Erick
>>
>> On Thu, Aug 24, 2017 at 11:15 AM, S G <sg...@gmail.com> wrote:
>> > Hi,
>> >
>> > We are looking to run Solr in-memory for testing and examples.
>> >
>> > For example:
>> > 1) Cassandra has cassandra-unit:
>> > https://github.com/jsevellec/cassandra-unit/wiki/How-to-
>> use-it-in-your-code
>> >
>> > 2) Storm has local-mode:
>> > http://storm.apache.org/releases/current/Local-mode.html
>> >
>> > Is there something similar for Solr too?
>> >
>> > Thanks
>> > SG
>>

Re: Running Solr-Server inside other process

Posted by S G <sg...@gmail.com>.
Thanks Erick,

Yes, this seems to be what I want.
Is there a good example of how to use it?

Thanks
SG


On Thu, Aug 24, 2017 at 5:02 PM, Erick Erickson <er...@gmail.com>
wrote:

> Solr has the EmbeddedSolrServer is that what you're looking for?
>
> Best,
> Erick
>
> On Thu, Aug 24, 2017 at 11:15 AM, S G <sg...@gmail.com> wrote:
> > Hi,
> >
> > We are looking to run Solr in-memory for testing and examples.
> >
> > For example:
> > 1) Cassandra has cassandra-unit:
> > https://github.com/jsevellec/cassandra-unit/wiki/How-to-
> use-it-in-your-code
> >
> > 2) Storm has local-mode:
> > http://storm.apache.org/releases/current/Local-mode.html
> >
> > Is there something similar for Solr too?
> >
> > Thanks
> > SG
>

Re: Running Solr-Server inside other process

Posted by Erick Erickson <er...@gmail.com>.
Solr has the EmbeddedSolrServer is that what you're looking for?

Best,
Erick

On Thu, Aug 24, 2017 at 11:15 AM, S G <sg...@gmail.com> wrote:
> Hi,
>
> We are looking to run Solr in-memory for testing and examples.
>
> For example:
> 1) Cassandra has cassandra-unit:
> https://github.com/jsevellec/cassandra-unit/wiki/How-to-use-it-in-your-code
>
> 2) Storm has local-mode:
> http://storm.apache.org/releases/current/Local-mode.html
>
> Is there something similar for Solr too?
>
> Thanks
> SG