Package org.apache.solr.client.solrj.request

# Class GenericV2SolrRequest

java.lang.Object
org.apache.solr.client.solrj.SolrRequest<SimpleSolrResponse>
org.apache.solr.client.solrj.request.GenericSolrRequest
org.apache.solr.client.solrj.request.GenericV2SolrRequest

All Implemented Interfaces:
  `Serializable`

public class GenericV2SolrRequest extends GenericSolrRequest
A `GenericSolrRequest` implementation intended for v2 APIs

See Also:
  - Serialized Form

## 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.request.GenericSolrRequest

`contentWriter, requiresCollection, response`

### Fields inherited from class org.apache.solr.client.solrj.SolrRequest

`SUPPORTED_METHODS`

## Constructor Summary

Constructors
Constructor
Description
`GenericV2SolrRequest(SolrRequest.METHOD m, String path)`
`GenericV2SolrRequest(SolrRequest.METHOD m, String path, SolrRequest.SolrRequestType requestType)`
`GenericV2SolrRequest(SolrRequest.METHOD m, String path, SolrRequest.SolrRequestType requestType, SolrParams params)`
`GenericV2SolrRequest(SolrRequest.METHOD m, String path, SolrParams params)`

## Method Summary

Modifier and Type
Method
Description
`SolrRequest.ApiVersion`
`getApiVersion()`
Indicates which API version this request will make

### Methods inherited from class org.apache.solr.client.solrj.request.GenericSolrRequest

`createResponse, getContentWriter, getParams, requiresCollection, setContentWriter, setRequiresCollection, withContent`

### Methods inherited from class org.apache.solr.client.solrj.SolrRequest

`addHeader, addHeaders, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getRequestType, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, processWithBaseUrl, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setRequestType, setResponseParser, setStreamingResponseCallback, setUserPrincipal`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### GenericV2SolrRequest

public GenericV2SolrRequest(SolrRequest.METHOD m, String path)

Parameters:
  `m` - the HTTP method to use for this request
  `path` - the HTTP path to use for this request. Path may include the v2 API root path (i.e. "/api"), but does not need to. If users are making a collection-aware request (i.e. `GenericSolrRequest.setRequiresCollection(boolean)` is called with 'true'), only the section of the API path following the collection or core should be provided here.

### GenericV2SolrRequest

public GenericV2SolrRequest(SolrRequest.METHOD m, String path, SolrRequest.SolrRequestType requestType)

Parameters:
  `m` - the HTTP method to use for this request
  `path` - the HTTP path to use for this request. Path may include the v2 API root path (i.e. "/api"), but does not need to. If users are making a collection-aware request (i.e. `GenericSolrRequest.setRequiresCollection(boolean)` is called with 'true'), only the section of the API path following the collection or core should be provided here.
  `requestType` - the type of this request

### GenericV2SolrRequest

public GenericV2SolrRequest(SolrRequest.METHOD m, String path, SolrParams params)

Parameters:
  `m` - the HTTP method to use for this request
  `path` - the HTTP path to use for this request. If users are making a collection-aware request (i.e. `GenericSolrRequest.setRequiresCollection(boolean)` is called with 'true'), only the section of the API path following the collection or core should be provided here.
  `params` - query parameter names and values for making this request.

### GenericV2SolrRequest

public GenericV2SolrRequest(SolrRequest.METHOD m, String path, SolrRequest.SolrRequestType requestType, SolrParams params)

Parameters:
  `m` - the HTTP method to use for this request
  `path` - the HTTP path to use for this request. If users are making a collection-aware request (i.e. `GenericSolrRequest.setRequiresCollection(boolean)` is called with 'true'), only the section of the API path following the collection or core should be provided here.
  `requestType` - the type of this request
  `params` - query parameter names and values for making this request.

## Method Details

### getApiVersion

public SolrRequest.ApiVersion getApiVersion()
Description copied from class: `SolrRequest`
Indicates which API version this request will make

Defaults implementation returns 'V1'.

Overrides:
  `getApiVersion` in class `SolrRequest<SimpleSolrResponse>`