public interface SearchOperationListener
Modifier and Type | Interface and Description |
---|---|
static class |
SearchOperationListener.CompositeListener
A Composite listener that multiplexes calls to each of the listeners methods.
|
Modifier and Type | Method and Description |
---|---|
default void |
onFailedFetchPhase(SearchContext searchContext)
Executed if a fetch phased failed.
|
default void |
onFailedQueryPhase(SearchContext searchContext)
Executed if a query phased failed.
|
default void |
onFetchPhase(SearchContext searchContext,
long tookInNanos)
Executed after the fetch phase successfully finished.
|
default void |
onFreeContext(SearchContext context)
Executed when a previously created search context is freed.
|
default void |
onFreeScrollContext(SearchContext context)
Executed when a scroll search
SearchContext is freed. |
default void |
onNewContext(SearchContext context)
Executed when a new search context was created
|
default void |
onNewScrollContext(SearchContext context)
Executed when a new scroll search
SearchContext was created |
default void |
onPreFetchPhase(SearchContext searchContext)
Executed before the fetch phase is executed
|
default void |
onPreQueryPhase(SearchContext searchContext)
Executed before the query phase is executed
|
default void |
onQueryPhase(SearchContext searchContext,
long tookInNanos)
Executed after the query phase successfully finished.
|
default void |
validateSearchContext(SearchContext context,
TransportRequest transportRequest)
Executed prior to using a
SearchContext that has been retrieved
from the active contexts. |
default void onPreQueryPhase(SearchContext searchContext)
searchContext
- the current search contextdefault void onFailedQueryPhase(SearchContext searchContext)
searchContext
- the current search contextdefault void onQueryPhase(SearchContext searchContext, long tookInNanos)
searchContext
- the current search contexttookInNanos
- the number of nanoseconds the query execution tookonFailedQueryPhase(SearchContext)
default void onPreFetchPhase(SearchContext searchContext)
searchContext
- the current search contextdefault void onFailedFetchPhase(SearchContext searchContext)
searchContext
- the current search contextdefault void onFetchPhase(SearchContext searchContext, long tookInNanos)
searchContext
- the current search contexttookInNanos
- the number of nanoseconds the fetch execution tookonFailedFetchPhase(SearchContext)
default void onNewContext(SearchContext context)
context
- the created contextdefault void onFreeContext(SearchContext context)
context
- the freed search contextdefault void onNewScrollContext(SearchContext context)
SearchContext
was createdcontext
- the created search contextdefault void onFreeScrollContext(SearchContext context)
SearchContext
is freed.
This happens either when the scroll search execution finishes, if the
execution failed or if the search context as idle for and needs to be
cleaned up.context
- the freed search contextdefault void validateSearchContext(SearchContext context, TransportRequest transportRequest)
SearchContext
that has been retrieved
from the active contexts. If the context is deemed invalid a runtime
exception can be thrown, which will prevent the context from being used.context
- the context retrieved from the active contextstransportRequest
- the request that is going to use the search context