Ryan, If we index the documents using CommonsHttpSolrServer and search using the same, we get the updated results
That means we can search the latest added document as well even if it is not committed to the file system So it looks like there is some kind of cache that is used by both index and search logic inside solr for a given SolrServer components (e. g. CommonsHttpSolrServer, EmbeddedSolrServer) Is there any way to configure that same cache will be used by the component that respond to HTTP request through CommonsHttpSolrServer and the component used by EmbeddedSolrServer? I don't see any reason why searcher and/or indexer for a given SolrServer need to maintain exclusive cache Calling commit on the SolrServer to synch with the index data may not be good option as I suppose it to be expensive operation. The cache and hard disk data synchronization should be independent of the SolrServer instances managed by Solr Web Application inside tomcat. The issue still will be that EmbeddedSolrServer may directly access hard index data as it may bypass the Solr web app totally I am embedding tomcat in my RMI server. The RMI Server is going to use EmbeddedSolrServer and it also hosts the Solr WebApp inside its tomcat instance So I guess I should be able to manage a singleton cache that is given to both, CommonsHttpSolrServer related components managed inside Solr WebApp and EmbeddedSolrServer components Please comment. Thanks, Ajit -----Original Message----- From: Ryan McKinley [mailto:ryan...@gmail.com] Sent: Monday, February 09, 2009 9:23 PM To: solr-user@lucene.apache.org Subject: Re: Combination of EmbeddedSolrServer and CommonHttpSolrServer > Keep in mind that the way lucene/solr work is that the results are constant from when you open the searcher. If new documents are added (without re-opening the searcher) they will not be seen. <commit/> tells solr to re-open the index and see the changes. > 1. Does this mean that committing on the indexing (Embedded) server > does > not reflect the document changes when we fire a search through another > (HTTP) server? correct. The HTTP server would still be open from before the indexing happened. > > 2. What happens to the commit fired on the indexing server? Can I > remove > that and just commit on the "read only" server? Call commit on the indexing server, then the read only server then you can delete the Embedded server > > 3. Do we have to fire a Commit (on the HTTP server) before we try to > search for a document? Yes -- calling commit will re-open the index and reflect any changes to it > > 4. Can we make any setting (perhaps using auto-commit) on the HTTP > server to avoid this scenario? > Not really -- the HTTP core has no idea what is happening on the other core. ryan