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

Reply via email to