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 Thierry Templier <te...@yahoo.fr> on 2008/11/18 15:36:23 UTC

EmbeddedSolrServer questions

Hello,

I have some questions regarding the use of the EmbeddedSolrServer in order to embed a solr instance into a Java application.

1°) Is an instance of the EmbeddedSolrServer class threadsafe when used by several concurent threads?

2°) Regarding to transactions, can an instance of the EmbeddedSolrServer class be used in order to make two transactions in the same time by two different threads?

Thanks for your help,
Thierry


      


Re: EmbeddedSolrServer questions

Posted by Jeryl Cook <tw...@gmail.com>.
i am using embeddedSolrServer and simply has a queue that documents
are sent to ..and a listerner on that queue that writes it to the
index..

or just keep it simple, and do a synchronization block around the
method in the writeserver that writes the document to the index.

Jeryl Cook
/^\ Pharaoh /^\
http://pharaohofkush.blogspot.com/
"Whether we bring our enemies to justice, or bring justice to our
enemies, justice will be done."
--George W. Bush, Address to a Joint Session of Congress and the
American People, September 20, 2001

On Tue, Nov 18, 2008 at 9:36 AM, Thierry Templier <te...@yahoo.fr> wrote:
> Hello,
>
> I have some questions regarding the use of the EmbeddedSolrServer in order to embed a solr instance into a Java application.
>
> 1°) Is an instance of the EmbeddedSolrServer class threadsafe when used by several concurent threads?
>
> 2°) Regarding to transactions, can an instance of the EmbeddedSolrServer class be used in order to make two transactions in the same time by two different threads?
>
> Thanks for your help,
> Thierry
>
>
>
>
>



-- 
Jeryl Cook
/^\ Pharaoh /^\
http://pharaohofkush.blogspot.com/
"Whether we bring our enemies to justice, or bring justice to our
enemies, justice will be done."
--George W. Bush, Address to a Joint Session of Congress and the
American People, September 20, 2001