Class SearchHandler
- java.lang.Object
-
- org.apache.solr.handler.RequestHandlerBase
-
- org.apache.solr.handler.component.SearchHandler
-
- All Implemented Interfaces:
AutoCloseable,ApiSupport,SolrInfoBean,NestedRequestHandler,SolrMetricProducer,SolrRequestHandler,PermissionNameProvider,PluginInfoInitialized,SolrCoreAware
- Direct Known Subclasses:
ExportHandler,RealTimeGetHandler,StandardRequestHandler
public class SearchHandler extends RequestHandlerBase implements SolrCoreAware, PluginInfoInitialized, PermissionNameProvider
Refer SOLR-281
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.security.PermissionNameProvider
PermissionNameProvider.Name
-
Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoBean
SolrInfoBean.Category, SolrInfoBean.Group
-
-
Field Summary
Fields Modifier and Type Field Description protected List<SearchComponent>components-
Fields inherited from class org.apache.solr.handler.RequestHandlerBase
appends, defaults, httpCaching, initArgs, invariants, solrMetricsContext
-
Fields inherited from interface org.apache.solr.security.PermissionNameProvider
ANY, NULL, values
-
Fields inherited from interface org.apache.solr.request.SolrRequestHandler
TYPE
-
-
Constructor Summary
Constructors Constructor Description SearchHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<SearchComponent>getComponents()protected List<String>getDefaultComponents()StringgetDescription()Simple one or two line descriptionPermissionNameProvider.NamegetPermissionName(AuthorizationContext ctx)voidhandleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp)voidinform(SolrCore core)Initialize the components based on name.voidinit(PluginInfo info)protected ResponseBuildernewResponseBuilder(SolrQueryRequest req, SolrQueryResponse rsp, List<SearchComponent> components)Override this method if you require a customResponseBuildere.g.BooleanregisterV2()Whether this request handler must be made available at the /v2/ path-
Methods inherited from class org.apache.solr.handler.RequestHandlerBase
getApis, getCategory, getInitArgs, getMetricNames, getName, getPluginInfo, getRequestHandler, getSolrMetricsContext, getSolrParamsFromNamedList, getSubHandler, handleRequest, init, initializeMetrics, setPluginInfo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.api.ApiSupport
registerV1
-
Methods inherited from interface org.apache.solr.core.SolrInfoBean
getMetricRegistry, getMetricsSnapshot, registerMetricName
-
Methods inherited from interface org.apache.solr.metrics.SolrMetricProducer
close, initializeMetrics
-
-
-
-
Field Detail
-
components
protected volatile List<SearchComponent> components
-
-
Method Detail
-
init
public void init(PluginInfo info)
- Specified by:
initin interfacePluginInfoInitialized
-
getPermissionName
public PermissionNameProvider.Name getPermissionName(AuthorizationContext ctx)
- Specified by:
getPermissionNamein interfacePermissionNameProvider
-
inform
public void inform(SolrCore core)
Initialize the components based on name. Note, if usingINIT_FIRST_COMPONENTSorINIT_LAST_COMPONENTS, then theDebugComponentwill always occur last. If this is not desired, then one must explicitly declare all components using theINIT_COMPONENTSsyntax.- Specified by:
informin interfaceSolrCoreAware
-
getComponents
public List<SearchComponent> getComponents()
-
newResponseBuilder
protected ResponseBuilder newResponseBuilder(SolrQueryRequest req, SolrQueryResponse rsp, List<SearchComponent> components)
Override this method if you require a customResponseBuildere.g. for use by a customSearchComponent.
-
handleRequestBody
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
- Specified by:
handleRequestBodyin classRequestHandlerBase- Throws:
Exception
-
getDescription
public String getDescription()
Description copied from interface:SolrInfoBeanSimple one or two line description- Specified by:
getDescriptionin interfaceSolrInfoBean- Specified by:
getDescriptionin classRequestHandlerBase
-
registerV2
public Boolean registerV2()
Description copied from interface:ApiSupportWhether this request handler must be made available at the /v2/ path- Specified by:
registerV2in interfaceApiSupport
-
-