Class SearchInvoker

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    InterleavedSearchInvoker, RpcSearchInvoker, SearchErrorInvoker

    public abstract class SearchInvoker
    extends CloseableInvoker
    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 Detail

      • SearchInvoker

        protected SearchInvoker​(java.util.Optional<Node> node)
    • Method Detail

      • search

        public Result search​(Query query,
                             Execution execution)
                      throws java.io.IOException
        Retrieve the hits for the given Query. If the search is run on multiple content nodes, the provided Execution may be used to retrieve document summaries required for correct result windowing.
        Throws:
        java.io.IOException
      • sendSearchRequest

        protected abstract void sendSearchRequest​(Query query)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getSearchResult

        protected abstract InvokerResult getSearchResult​(Execution execution)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • responseAvailable

        protected void responseAvailable()
      • distributionKey

        protected java.util.Optional<java.lang.Integer> distributionKey()