On Fri, Oct 30, 2009 at 11:20:19AM +0530, Shalin Shekhar Mangar said: > That is very strange. IndexReaders do get re-opened after commits. Do you > see a commit message in the Solr logs?
Sorry for the delay - I've been trying to puzzle over this some more. The code looks like server.add(docs); server.commit(); server.optimize(); I'm seeing which would seem to indicate that both a commit and an optimize are happening and that a new searcher is getting opened. documentCache{lookups=0,hits=0,hitratio=0.00,inserts=10,evictions=0,size=10,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} Nov 4, 2009 11:38:06 AM org.apache.solr.update.processor.LogUpdateProcessor finish INFO: {commit=} 0 264 Nov 4, 2009 11:38:06 AM org.apache.solr.core.SolrCore execute INFO: [] webapp=null path=/update params={commit=true&waitFlush=true&waitSearcher=true} status=0 QTime=264 Nov 4, 2009 11:38:06 AM org.apache.solr.update.DirectUpdateHandler2 commit INFO: start commit(optimize=true,waitFlush=true,waitSearcher=true) Nov 4, 2009 11:38:08 AM org.apache.solr.search.SolrIndexSearcher <init> INFO: Opening searc...@6d3f199b main Nov 4, 2009 11:38:08 AM org.apache.solr.update.DirectUpdateHandler2 commit INFO: end_commit_flush Nov 4, 2009 11:38:08 AM org.apache.solr.search.SolrIndexSearcher warm INFO: autowarming searc...@6d3f199b main from searc...@2f8acca4 main But I still the same result. We ended up going a different route anyway but I'm still slightly confused. For what it's worth - the code for instantiating the server is SolrConfig solrConfig = new SolrConfig(CONFIG_PATH,"solrconfig.xml",null); IndexSchema indexSchema = new IndexSchema(solrConfig,"schema.xml",null); SolrResourceLoader resource = new SolrResourceLoader (SolrResourceLoader.locateInstanceDir()) CoreContainer container = new CoreContainer(resource); CoreDescriptor dcore = new CoreDescriptor(container, "", solrConfig.getResourceLoader().getInstanceDir()); dcore.setConfigName(solrConfig.getResourceName()); dcore.setSchemaName(indexSchema.getResourceName()); core = new SolrCore(null, DATA_PATH, solrConfig, indexSchema, dcore); container.register("", core, false); server = new EmbeddedSolrServer(container, ""); Thanks, Simon