Hi Alex, Why not just use two webapps and not use EmbeddedSolrServer, but do all your indexing as requests from your application to the Solr context next door?
One advantage of doing it this way is that EmbeddedSolrServer has been deemphasized by the Solr team, so you might not get the maintenance you need to keep this system going. Michael Della Bitta Applications Developer o: +1 646 532 3062 | c: +1 917 477 7906 appinions inc. “The Science of Influence Marketing” 18 East 41st Street New York, NY 10017 t: @appinions <https://twitter.com/Appinions> | g+: plus.google.com/appinions w: appinions.com <http://www.appinions.com/> On Mon, Jun 10, 2013 at 1:22 PM, Alex Sarco <alex.sa...@ig.com> wrote: > Hi, > > I'm running Solr 4.3 embedded in Tomcat, so there's a Solr server starting > when Tomcat starts. > In the same webapp, I also have a process to recreate the Lucene index > when Solr starts. To do this, I have a singleton instance of > EmbeddedSolrServer provided by Spring. This same instance is also used to > update the index every once in a while (when a message advising of a DB > update is received). > This works quite well, but my problem is the adds/updates I make to the > index using EmbeddedSolrServer are not visible by the Solr instance started > by Tomcat, unless I restart Tomcat (which is obviously not an option). > So, my questions are: > > > 1) Is there any way to get a reference to the Solr server started by > Tomcat, and not having to start another one? > > 2) Any other suggestion as how to implement this kind of architecture? > > ________________________________ > The information contained in this email is strictly confidential and for > the use of the addressee only, unless otherwise indicated. If you are not > the intended recipient, please do not read, copy, use or disclose to others > this message or any attachment. Please also notify the sender by replying > to this email or by telephone (+44(020 7896 0011) and then delete the email > and any copies of it. Opinions, conclusion (etc) that do not relate to the > official business of this company shall be understood as neither given nor > endorsed by it. IG is a trading name of IG Markets Limited (a company > registered in England and Wales, company number 04008957) and IG Index > Limited (a company registered in England and Wales, company number > 01190902). Registered address at Cannon Bridge House, 25 Dowgate Hill, > London EC4R 2YA. Both IG Markets Limited (register number 195355) and IG > Index Limited (register number 114059) are authorised and regulated by the > Financial Services Authority. >