Package org.apache.solr.core
Class QuerySenderListener
- java.lang.Object
-
- org.apache.solr.core.AbstractSolrEventListener
-
- org.apache.solr.core.QuerySenderListener
-
- All Implemented Interfaces:
SolrEventListener
,NamedListInitializedPlugin
public class QuerySenderListener extends AbstractSolrEventListener
-
-
Constructor Summary
Constructors Constructor Description QuerySenderListener(SolrCore core)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static List<org.apache.solr.common.util.NamedList<Object>>
convertQueriesToList(ArrayList<Object> queries)
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.-
Methods inherited from class org.apache.solr.core.AbstractSolrEventListener
addEventParms, getArgs, getCore, init, postCommit, postSoftCommit, toString
-
-
-
-
Constructor Detail
-
QuerySenderListener
public QuerySenderListener(SolrCore core)
-
-
Method Detail
-
newSearcher
public void newSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher)
Description copied from interface:SolrEventListener
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 eventEventParams.NEW_SEARCHER
- New Searcher event
if (currentSearcher != null) { nlst.add(CommonParams.EVENT, CommonParams.NEW_SEARCHER); } else { nlst.add(CommonParams.EVENT, CommonParams.FIRST_SEARCHER); }
- Specified by:
newSearcher
in interfaceSolrEventListener
- Overrides:
newSearcher
in classAbstractSolrEventListener
- Parameters:
newSearcher
- The newSolrIndexSearcher
to usecurrentSearcher
- The existingSolrIndexSearcher
. null if this is a firstSearcher event.- See Also:
AbstractSolrEventListener.addEventParms(org.apache.solr.search.SolrIndexSearcher, org.apache.solr.common.util.NamedList)
-
-