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

# Class CollectionsApi.CreateCollection

java.lang.Object
org.apache.solr.client.solrj.SolrRequest<SubResponseAccumulatingJerseyResponse>
org.apache.solr.client.solrj.request.CollectionsApi.CreateCollection

All Implemented Interfaces:
  `Serializable`

Enclosing class:
  `CollectionsApi`

public static class CollectionsApi.CreateCollection extends SolrRequest<SubResponseAccumulatingJerseyResponse>

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.SolrRequest

`SUPPORTED_METHODS`

## Constructor Summary

Constructors
Constructor
Description
`CreateCollection()`
Create a CreateCollection request object.

## Method Summary

Modifier and Type
Method
Description
`protected SubResponseAccumulatingJerseyResponse`
`createResponse(NamedList<Object> namedList)`
Create a new SolrResponse to hold the response from the server.
`SolrRequest.ApiVersion`
`getApiVersion()`
Indicates which API version this request will make
`RequestWriter.ContentWriter`
`getContentWriter(String _expectedTypeIGNORE)`
If a request object wants to do a push write, implement this method.
`SolrParams`
`getParams()`
The parameters for this request; never null.
`Set<String>`
`getQueryParams()`
Parameter keys that are sent via the query string
`ResponseParser`
`getResponseParser()`
`void`
`setAlias(String alias)`
`void`
`setAsync(String async)`
`void`
`setConfig(String config)`
`void`
`setCreateReplicas(Boolean createReplicas)`
`void`
`setName(String name)`
`void`
`setNodeSet(List<String> nodeSet)`
`void`
`setNrtReplicas(Integer nrtReplicas)`
`void`
`setNumShards(Integer numShards)`
`void`
`setPerReplicaState(Boolean perReplicaState)`
`void`
`setProperties(Map<String,String> properties)`
`void`
`setPullReplicas(Integer pullReplicas)`
`void`
`setReplicationFactor(Integer replicationFactor)`
`void`
`setRouter(CreateCollectionRouterProperties router)`
`void`
`setShardNames(List<String> shardNames)`
`void`
`setShuffleNodes(Boolean shuffleNodes)`
`void`
`setTlogReplicas(Integer tlogReplicas)`
`void`
`setWaitForFinalState(Boolean waitForFinalState)`

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

`addHeader, addHeaders, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getHeaders, getMethod, getPath, getPreferredNodes, getRequestType, getStreamingResponseCallback, getUserPrincipal, process, process, processWithBaseUrl, requiresCollection, 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

### CreateCollection

public CreateCollection()
Create a CreateCollection request object.

## Method Details

### setName

public void setName(String name)

### setReplicationFactor

public void setReplicationFactor(Integer replicationFactor)

### setConfig

public void setConfig(String config)

### setNumShards

public void setNumShards(Integer numShards)

### setShardNames

public void setShardNames(List<String> shardNames)

### setPullReplicas

public void setPullReplicas(Integer pullReplicas)

### setTlogReplicas

public void setTlogReplicas(Integer tlogReplicas)

### setNrtReplicas

public void setNrtReplicas(Integer nrtReplicas)

### setWaitForFinalState

public void setWaitForFinalState(Boolean waitForFinalState)

### setPerReplicaState

public void setPerReplicaState(Boolean perReplicaState)

### setAlias

public void setAlias(String alias)

### setProperties

public void setProperties(Map<String,String> properties)

### setAsync

public void setAsync(String async)

### setRouter

public void setRouter(CreateCollectionRouterProperties router)

### setNodeSet

public void setNodeSet(List<String> nodeSet)

### setCreateReplicas

public void setCreateReplicas(Boolean createReplicas)

### setShuffleNodes

public void setShuffleNodes(Boolean shuffleNodes)

### getContentWriter

public RequestWriter.ContentWriter getContentWriter(String _expectedTypeIGNORE)
Description copied from class: `SolrRequest`
If a request object wants to do a push write, implement this method.

Overrides:
  `getContentWriter` in class `SolrRequest<SubResponseAccumulatingJerseyResponse>`
Parameters:
  `_expectedTypeIGNORE` - This is the type that the RequestWriter would like to get. But, it is OK to send any format

### 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<SubResponseAccumulatingJerseyResponse>`

### getParams

public SolrParams getParams()
Description copied from class: `SolrRequest`
The parameters for this request; never null. The runtime type may be mutable but modifications may not affect this `SolrRequest` instance, as it may return a new instance here every time. If the subclass specifies the response type as `ModifiableSolrParams`, 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:
  `getParams` in class `SolrRequest<SubResponseAccumulatingJerseyResponse>`

### getQueryParams

public Set<String> getQueryParams()
Description copied from class: `SolrRequest`
Parameter keys that are sent via the query string

Overrides:
  `getQueryParams` in class `SolrRequest<SubResponseAccumulatingJerseyResponse>`

### createResponse

protected SubResponseAccumulatingJerseyResponse createResponse(NamedList<Object> namedList)
Description copied from class: `SolrRequest`
Create a new SolrResponse to hold the response from the server. If the response extends `SolrResponse`, then there's no need to use the arguments, as `SolrResponse.setResponse(NamedList)` will be called right after this method.

Specified by:
  `createResponse` in class `SolrRequest<SubResponseAccumulatingJerseyResponse>`
Parameters:
  `namedList` - from `SolrClient.request(SolrRequest, String)`.

### getResponseParser

public ResponseParser getResponseParser()

Overrides:
  `getResponseParser` in class `SolrRequest<SubResponseAccumulatingJerseyResponse>`
Returns:
  The `ResponseParser`