pass current searcher to newSearcher hook

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@681447 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2008-07-31 19:27:36 +00:00
parent a7cda85584
commit 258cb3e84d
2 changed files with 5 additions and 1 deletions

View File

@ -987,7 +987,7 @@ public final class SolrCore {
public Object call() throws Exception {
try {
for (SolrEventListener listener : newSearcherListeners) {
listener.newSearcher(newSearcher,null);
listener.newSearcher(newSearcher, currSearcher);
}
} catch (Throwable e) {
SolrException.logOnce(log,null,e);

View File

@ -32,6 +32,10 @@ public interface SolrEventListener {
public void postCommit();
/** The searchers passed here are only guaranteed to be valid for the duration
* of this method call, so care should be taken not to spawn threads or asynchronous
* tasks with references to these searchers.
*/
public void newSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher);
}