mirror of https://github.com/apache/lucene.git
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:
parent
a7cda85584
commit
258cb3e84d
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
Loading…
Reference in New Issue