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 Clemens Wyss DEV <cl...@mysign.ch> on 2015/04/29 15:49:35 UTC

Embedded Solr, event for "cores up-and-running"?

If I run Solr in ebmedded mode (which I shouldn't, I know ;) ) how do I know (event?) that the cores are up-and-running, i.e. all is initialized?

Thx
Clemens

Re: Embedded Solr, event for "cores up-and-running"?

Posted by Shawn Heisey <ap...@elyograg.org>.
On 4/29/2015 9:26 AM, Erick Erickson wrote:
> I'm not sure there _is_ a good way short of sending a query at it.
> Since great efforts are made to have the embedded Solr act just like
> an external version, there's not much in the way of back-doors that I
> know of.

Do the calls which create the EmbeddedSolrServer block until they are
done, or return immediately and do their work in the background?

Based on the code in the following example, I think they probably block
until they're done:

https://gist.github.com/delip/6214406

My guess is based on the fact that the code which indexes documents is
immediately after the EmbeddedSolrServer constructor, with no "wait for
X" loop.  If we assume this code works, which it probably does, then I
believe it MUST block until finished.  I've never used the embedded server.

If that guess is right, then it would be very easy to know when it's
ready to use -- just wait for the constructor to finish.

Thanks,
Shawn


Re: Embedded Solr, event for "cores up-and-running"?

Posted by Erick Erickson <er...@gmail.com>.
I'm not sure there _is_ a good way short of sending a query at it.
Since great efforts are made to have the embedded Solr act just like
an external version, there's not much in the way of back-doors that I
know of.

Best,
Erick

On Wed, Apr 29, 2015 at 6:49 AM, Clemens Wyss DEV <cl...@mysign.ch> wrote:
> If I run Solr in ebmedded mode (which I shouldn't, I know ;) ) how do I know (event?) that the cores are up-and-running, i.e. all is initialized?
>
> Thx
> Clemens