Class SolrPing
java.lang.Object
org.apache.solr.client.solrj.SolrRequest<SolrPingResponse>
org.apache.solr.client.solrj.request.CollectionRequiringSolrRequest<SolrPingResponse>
org.apache.solr.client.solrj.request.SolrPing
- All Implemented Interfaces:
Serializable
Verify that there is a working Solr core at the URL of a
SolrClient. To use this class, the solrconfig.xml for the relevant
core must include the request handler for /admin/ping.- Since:
- solr 1.3
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
SolrRequest.ApiVersion, SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType -
Field Summary
Fields inherited from class org.apache.solr.client.solrj.SolrRequest
SUPPORTED_METHODS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SolrPingResponsecreateResponse(NamedList<Object> namedList) Create a new SolrResponse to hold the response from the server.The parameters for this request; never null.Remove the action parameter from this request.Set the action parameter on this request to enable.Set the action parameter on this request to enable.Set the action parameter on this request to ping.Methods inherited from class org.apache.solr.client.solrj.request.CollectionRequiringSolrRequest
requiresCollectionMethods inherited from class org.apache.solr.client.solrj.SolrRequest
addHeader, addHeaders, getApiVersion, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getRequestType, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, processWithBaseUrl, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setRequestType, setResponseParser, setStreamingResponseCallback, setUserPrincipal
-
Constructor Details
-
SolrPing
public SolrPing()Create a new SolrPing object.
-
-
Method Details
-
createResponse
Description copied from class:SolrRequestCreate a new SolrResponse to hold the response from the server. If the response extendsSolrResponse, then there's no need to use the arguments, asSolrResponse.setResponse(NamedList)will be called right after this method.- Specified by:
createResponsein classSolrRequest<SolrPingResponse>- Parameters:
namedList- fromSolrClient.request(SolrRequest, String).
-
getParams
Description copied from class:SolrRequestThe parameters for this request; never null. The runtime type may be mutable but modifications may not affect thisSolrRequestinstance, as it may return a new instance here every time. If the subclass specifies the response type asModifiableSolrParams, then one can expect it to change this request. If the subclass has a setter then one can expect this method to return the value set.- Specified by:
getParamsin classSolrRequest<SolrPingResponse>
-
removeAction
Remove the action parameter from this request. This will result in the same behavior asSolrPing#setActionPing(). For Solr server version 4.0 and later.- Returns:
- this
-
setActionDisable
Set the action parameter on this request to enable. This will delete the health-check file for the Solr core. For Solr server version 4.0 and later.- Returns:
- this
-
setActionEnable
Set the action parameter on this request to enable. This will create the health-check file for the Solr core. For Solr server version 4.0 and later.- Returns:
- this
-
setActionPing
Set the action parameter on this request to ping. This is the same as not including the action at all. For Solr server version 4.0 and later.- Returns:
- this
-