Class SearchHandler

  • All Implemented Interfaces:
    com.yahoo.jdisc.handler.RequestHandler, com.yahoo.jdisc.SharedResource

    public class SearchHandler
    extends com.yahoo.container.jdisc.LoggingRequestHandler
    Handles search request.
    Author:
    Steinar Knutsen
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.yahoo.container.jdisc.LoggingRequestHandler

        com.yahoo.container.jdisc.LoggingRequestHandler.Context
      • Nested classes/interfaces inherited from class com.yahoo.container.jdisc.ThreadedHttpRequestHandler

        com.yahoo.container.jdisc.ThreadedHttpRequestHandler.LazyContentChannel
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String defaultSearchChainName  
      • Fields inherited from class com.yahoo.container.jdisc.ThreadedHttpRequestHandler

        CONTENT_TYPE
      • Fields inherited from class com.yahoo.container.jdisc.ThreadedRequestHandler

        metric
      • Fields inherited from interface com.yahoo.jdisc.SharedResource

        DEBUG, SYSTEM_PROPERTY_NAME_DEBUG
    • Constructor Summary

      Constructors 
      Constructor Description
      SearchHandler​(com.yahoo.container.core.ChainsConfig chainsConfig, com.yahoo.search.config.IndexInfoConfig indexInfo, com.yahoo.container.QrSearchersConfig clusters, com.yahoo.vespa.configdefinition.SpecialtokensConfig specialtokens, com.yahoo.statistics.Statistics statistics, com.yahoo.language.Linguistics linguistics, com.yahoo.jdisc.Metric metric, com.yahoo.component.provider.ComponentRegistry<com.yahoo.processing.rendering.Renderer> renderers, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog accessLog, com.yahoo.search.query.profile.config.QueryProfilesConfig queryProfileConfig, com.yahoo.component.provider.ComponentRegistry<Searcher> searchers, com.yahoo.container.core.ContainerHttpConfig containerHttpConfig)
      Deprecated.
      use the other constructor
      SearchHandler​(com.yahoo.statistics.Statistics statistics, com.yahoo.jdisc.Metric metric, com.yahoo.container.handler.threadpool.ContainerThreadPool threadpool, com.yahoo.container.logging.AccessLog accessLog, CompiledQueryProfileRegistry queryProfileRegistry, com.yahoo.container.core.ContainerHttpConfig config, ExecutionFactory executionFactory)  
      SearchHandler​(com.yahoo.statistics.Statistics statistics, com.yahoo.jdisc.Metric metric, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog accessLog, CompiledQueryProfileRegistry queryProfileRegistry, com.yahoo.container.core.ContainerHttpConfig containerHttpConfig, ExecutionFactory executionFactory)  
      SearchHandler​(com.yahoo.statistics.Statistics statistics, com.yahoo.jdisc.Metric metric, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog accessLog, CompiledQueryProfileRegistry queryProfileRegistry, ExecutionFactory executionFactory, java.util.Optional<java.lang.String> hostResponseHeaderKey)  
      SearchHandler​(com.yahoo.statistics.Statistics statistics, com.yahoo.jdisc.Metric metric, java.util.concurrent.Executor executor, com.yahoo.container.logging.AccessLog accessLog, com.yahoo.search.query.profile.config.QueryProfilesConfig queryProfileConfig, com.yahoo.container.core.ContainerHttpConfig containerHttpConfig, ExecutionFactory executionFactory)
      Deprecated.
      Use the @Inject annotated constructor instead.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createRequestMapping​(com.yahoo.slime.Inspector inspector, java.util.Map<java.lang.String,​java.lang.String> map, java.lang.String parent)  
      com.yahoo.processing.rendering.Renderer<Result> getRendererCopy​(com.yahoo.component.ComponentSpecification spec)
      For internal use only
      java.util.Optional<com.yahoo.jdisc.Request.RequestType> getRequestType()  
      SearchChainRegistry getSearchChainRegistry()  
      com.yahoo.container.jdisc.HttpResponse handle​(com.yahoo.container.jdisc.HttpRequest request)  
      Result searchAndFill​(Query query, com.yahoo.component.chain.Chain<? extends Searcher> searchChain)
      Used from container SDK, for internal use only
      • Methods inherited from class com.yahoo.container.jdisc.LoggingRequestHandler

        createLoggingCompletionHandler, testOnlyContext
      • Methods inherited from class com.yahoo.container.jdisc.ThreadedHttpRequestHandler

        addDateHeader, asHttpRequest, handle, handleRequest
      • Methods inherited from class com.yahoo.container.jdisc.ThreadedRequestHandler

        executor, getTimeout, handleRequest, writeErrorResponseOnOverload
      • Methods inherited from class com.yahoo.jdisc.handler.AbstractRequestHandler

        handleTimeout
      • Methods inherited from class com.yahoo.jdisc.AbstractResource

        currentState, destroy, refer, release, retainCount
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.yahoo.jdisc.SharedResource

        refer, release
    • Field Detail

      • defaultSearchChainName

        public static final java.lang.String defaultSearchChainName
        See Also:
        Constant Field Values
    • Constructor Detail

      • SearchHandler

        @Inject
        public SearchHandler​(com.yahoo.statistics.Statistics statistics,
                             com.yahoo.jdisc.Metric metric,
                             com.yahoo.container.handler.threadpool.ContainerThreadPool threadpool,
                             com.yahoo.container.logging.AccessLog accessLog,
                             CompiledQueryProfileRegistry queryProfileRegistry,
                             com.yahoo.container.core.ContainerHttpConfig config,
                             ExecutionFactory executionFactory)
      • SearchHandler

        public SearchHandler​(com.yahoo.statistics.Statistics statistics,
                             com.yahoo.jdisc.Metric metric,
                             java.util.concurrent.Executor executor,
                             com.yahoo.container.logging.AccessLog accessLog,
                             CompiledQueryProfileRegistry queryProfileRegistry,
                             com.yahoo.container.core.ContainerHttpConfig containerHttpConfig,
                             ExecutionFactory executionFactory)
      • SearchHandler

        @Deprecated
        public SearchHandler​(com.yahoo.statistics.Statistics statistics,
                             com.yahoo.jdisc.Metric metric,
                             java.util.concurrent.Executor executor,
                             com.yahoo.container.logging.AccessLog accessLog,
                             com.yahoo.search.query.profile.config.QueryProfilesConfig queryProfileConfig,
                             com.yahoo.container.core.ContainerHttpConfig containerHttpConfig,
                             ExecutionFactory executionFactory)
        Deprecated.
        Use the @Inject annotated constructor instead.
      • SearchHandler

        public SearchHandler​(com.yahoo.statistics.Statistics statistics,
                             com.yahoo.jdisc.Metric metric,
                             java.util.concurrent.Executor executor,
                             com.yahoo.container.logging.AccessLog accessLog,
                             CompiledQueryProfileRegistry queryProfileRegistry,
                             ExecutionFactory executionFactory,
                             java.util.Optional<java.lang.String> hostResponseHeaderKey)
      • SearchHandler

        @Deprecated
        public SearchHandler​(com.yahoo.container.core.ChainsConfig chainsConfig,
                             com.yahoo.search.config.IndexInfoConfig indexInfo,
                             com.yahoo.container.QrSearchersConfig clusters,
                             com.yahoo.vespa.configdefinition.SpecialtokensConfig specialtokens,
                             com.yahoo.statistics.Statistics statistics,
                             com.yahoo.language.Linguistics linguistics,
                             com.yahoo.jdisc.Metric metric,
                             com.yahoo.component.provider.ComponentRegistry<com.yahoo.processing.rendering.Renderer> renderers,
                             java.util.concurrent.Executor executor,
                             com.yahoo.container.logging.AccessLog accessLog,
                             com.yahoo.search.query.profile.config.QueryProfilesConfig queryProfileConfig,
                             com.yahoo.component.provider.ComponentRegistry<Searcher> searchers,
                             com.yahoo.container.core.ContainerHttpConfig containerHttpConfig)
        Deprecated.
        use the other constructor
    • Method Detail

      • handle

        public final com.yahoo.container.jdisc.HttpResponse handle​(com.yahoo.container.jdisc.HttpRequest request)
        Specified by:
        handle in class com.yahoo.container.jdisc.ThreadedHttpRequestHandler
      • getRequestType

        public java.util.Optional<com.yahoo.jdisc.Request.RequestType> getRequestType()
        Overrides:
        getRequestType in class com.yahoo.container.jdisc.ThreadedRequestHandler
      • searchAndFill

        public Result searchAndFill​(Query query,
                                    com.yahoo.component.chain.Chain<? extends Searcher> searchChain)
        Used from container SDK, for internal use only
      • getRendererCopy

        public com.yahoo.processing.rendering.Renderer<Result> getRendererCopy​(com.yahoo.component.ComponentSpecification spec)
        For internal use only
      • createRequestMapping

        public void createRequestMapping​(com.yahoo.slime.Inspector inspector,
                                         java.util.Map<java.lang.String,​java.lang.String> map,
                                         java.lang.String parent)