Something funny is going on with my mail... It seems everything I have sent is disappearing... hopefully this will make it.
---------- Forwarded message ---------- From: Ryan McKinley <[EMAIL PROTECTED]> Date: Wed, Oct 1, 2008 at 4:21 PM Subject: read-only SolrCore? To: solr-dev@lucene.apache.org >From the lucene 2.4 draft announcement... * IndexReader can be opened with new readOnly=true mode, which gives better performance in a multi-threaded environment. I don't normally delve into lucene innards, so this may already be addressed. Would it be worthwhile adding a 'readonly' mode for slave servers? We have discussed this before, but usually end up saying "just don't send any updates" or run as a user who cant write the index... But if there is a performance win to opening in read-only, i think it is worth while. Setting the SolrCore to read only would also throw an error in the UpdateHandler if you try to update something... (rather then just <commmit/> to reopen the index -- language that has never really made sense) It looks like we have access to the read only searcher, but never call it. From SolrCore.java: // gets a non-caching searcher public SolrIndexSearcher newSearcher(String name) throws IOException { return newSearcher(name, false); } // gets a non-caching searcher public SolrIndexSearcher newSearcher(String name, boolean readOnly) throws IOException { return new SolrIndexSearcher(this, schema, "main", IndexReader.open(FSDirectory.getDirectory(getIndexDir()), readOnly), true, false); } thoughts? ryan