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()
String
getDescription()
Simple one or two line descriptionPermissionNameProvider.Name
getPermissionName(AuthorizationContext ctx)
void
handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp)
void
inform(SolrCore core)
Initialize the components based on name.void
init(PluginInfo info)
protected ResponseBuilder
newResponseBuilder(SolrQueryRequest req, SolrQueryResponse rsp, List<SearchComponent> components)
Override this method if you require a customResponseBuilder
e.g.Boolean
registerV2()
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:
init
in interfacePluginInfoInitialized
-
getPermissionName
public PermissionNameProvider.Name getPermissionName(AuthorizationContext ctx)
- Specified by:
getPermissionName
in interfacePermissionNameProvider
-
inform
public void inform(SolrCore core)
Initialize the components based on name. Note, if usingINIT_FIRST_COMPONENTS
orINIT_LAST_COMPONENTS
, then theDebugComponent
will always occur last. If this is not desired, then one must explicitly declare all components using theINIT_COMPONENTS
syntax.- Specified by:
inform
in interfaceSolrCoreAware
-
getComponents
public List<SearchComponent> getComponents()
-
newResponseBuilder
protected ResponseBuilder newResponseBuilder(SolrQueryRequest req, SolrQueryResponse rsp, List<SearchComponent> components)
Override this method if you require a customResponseBuilder
e.g. for use by a customSearchComponent
.
-
handleRequestBody
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
- Specified by:
handleRequestBody
in classRequestHandlerBase
- Throws:
Exception
-
getDescription
public String getDescription()
Description copied from interface:SolrInfoBean
Simple one or two line description- Specified by:
getDescription
in interfaceSolrInfoBean
- Specified by:
getDescription
in classRequestHandlerBase
-
registerV2
public Boolean registerV2()
Description copied from interface:ApiSupport
Whether this request handler must be made available at the /v2/ path- Specified by:
registerV2
in interfaceApiSupport
-
-