SolrEventListener (Solr 3.6.2 API)
Keywords: org.apache.solr.core.SolrEventListener interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.core
Interface SolrEventListener

All Superinterfaces:
  NamedListInitializedPlugin

    public interface SolrEventListener

extends NamedListInitializedPlugin

Version:
  $Id: SolrEventListener.java 1052938 2010-12-26 20:21:48Z rmuir $

Field Summary
`static org.slf4j.Logger` | `log`

Method Summary
`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()`

Methods inherited from interface org.apache.solr.util.plugin.NamedListInitializedPlugin
`init`

Field Detail

### log

    static final org.slf4j.Logger log

Method Detail

### 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:
  - `EventParams.FIRST_SEARCHER` - First Searcher event
  - `EventParams.NEW_SEARCHER` - New Searcher event
  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)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD