Package com.yahoo.search.dispatch
Class SearchInvoker
java.lang.Object
com.yahoo.search.dispatch.CloseableInvoker
com.yahoo.search.dispatch.SearchInvoker
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
InterleavedSearchInvoker,RpcSearchInvoker,SearchErrorInvoker
SearchInvoker encapsulates an allocated connection for running a single search query.
The invocation object can be stateful and should not be reused.
- Author:
- ollivir
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InvokerResulterrorResult(Query query, ErrorMessage errorMessage) protected abstract InvokerResultprotected voidRetrieve the hits for the givenQuery.protected abstract ObjectsendSearchRequest(Query query, Object context) protected voidsetMonitor(ResponseMonitor<SearchInvoker> monitor) Methods inherited from class com.yahoo.search.dispatch.CloseableInvoker
close, release, setFinalStatus, teardown
-
Constructor Details
-
SearchInvoker
-
-
Method Details
-
search
Retrieve the hits for the givenQuery. If the search is run on multiple content nodes, the providedExecutionmay be used to retrieve document summaries required for correct result windowing.- Throws:
IOException
-
sendSearchRequest
- Parameters:
query- the query to sendcontext- a context object that can be used to pass context among different invokers, e.g for reuse of preserialized data.- Returns:
- an object that can be passed to the next invocation of sendSearchRequest
- Throws:
IOException
-
getSearchResult
- Throws:
IOException
-
setMonitor
-
responseAvailable
protected void responseAvailable() -
distributionKey
-
errorResult
-