org.apache.solr.core
Interface SolrEventListener


public interface SolrEventListener

Version:
$Id: SolrEventListener.java 801417 2009-08-05 21:25:06Z gsingers $

Field Summary
static org.slf4j.Logger log
           
 
Method Summary
 void init(NamedList args)
           
 void newSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher)
          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.
 void postCommit()
           
 

Field Detail

log

static final org.slf4j.Logger log
Method Detail

init

void init(NamedList args)

postCommit

void postCommit()

newSearcher

void newSearcher(SolrIndexSearcher newSearcher,
                 SolrIndexSearcher currentSearcher)
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.

Implementations should add the EventParams.EVENT parameter and set it to a value of either:

Sample:
    if (currentSearcher != null) {
      nlst.add(CommonParams.EVENT, CommonParams.NEW_SEARCHER);
    } else {
      nlst.add(CommonParams.EVENT, CommonParams.FIRST_SEARCHER);
    }

 

Parameters:
newSearcher - The new SolrIndexSearcher to use
currentSearcher - The existing SolrIndexSearcher. null if this is a firstSearcher event.
See Also:
AbstractSolrEventListener.addEventParms(org.apache.solr.search.SolrIndexSearcher, org.apache.solr.common.util.NamedList)


Copyright © 2009 Apache Software Foundation. All Rights Reserved.