org.apache.solr.client.solrj.request

## Class CollectionAdminRequest.Create

- java.lang.Object
- - org.apache.solr.client.solrj.SolrRequest<T>
  - - org.apache.solr.client.solrj.request.CollectionAdminRequest<CollectionAdminResponse>
    - - org.apache.solr.client.solrj.request.CollectionAdminRequest.AsyncCollectionAdminRequest
      - - org.apache.solr.client.solrj.request.CollectionAdminRequest.AsyncCollectionSpecificAdminRequest
        - - org.apache.solr.client.solrj.request.CollectionAdminRequest.Create

All Implemented Interfaces:
  Serializable, V2RequestSupport, MapSerializable, MapWriter, NavigableObject

Enclosing class:
  CollectionAdminRequest<T extends CollectionAdminResponse>

    public static class CollectionAdminRequest.Create
    extends CollectionAdminRequest.AsyncCollectionSpecificAdminRequest

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.solr.client.solrj.request.CollectionAdminRequest

`CollectionAdminRequest.AddReplica, CollectionAdminRequest.AddReplicaProp, CollectionAdminRequest.AddRole, CollectionAdminRequest.AsyncCollectionAdminRequest, CollectionAdminRequest.AsyncCollectionSpecificAdminRequest, CollectionAdminRequest.AsyncShardSpecificAdminRequest, CollectionAdminRequest.Backup, CollectionAdminRequest.BalanceShardUnique, CollectionAdminRequest.ClusterProp, CollectionAdminRequest.ClusterStatus, CollectionAdminRequest.CollectionAdminRoleRequest, CollectionAdminRequest.CollectionProp, CollectionAdminRequest.Create, CollectionAdminRequest.CreateAlias, CollectionAdminRequest.CreateShard, CollectionAdminRequest.CreateSnapshot, CollectionAdminRequest.CreateTimeRoutedAlias, CollectionAdminRequest.Delete, CollectionAdminRequest.DeleteAlias, CollectionAdminRequest.DeleteNode, CollectionAdminRequest.DeleteReplica, CollectionAdminRequest.DeleteReplicaProp, CollectionAdminRequest.DeleteShard, CollectionAdminRequest.DeleteSnapshot, CollectionAdminRequest.DeleteStatus, CollectionAdminRequest.ForceLeader, CollectionAdminRequest.List, CollectionAdminRequest.ListAliases, CollectionAdminRequest.ListSnapshots, CollectionAdminRequest.Migrate, CollectionAdminRequest.MigrateClusterState, CollectionAdminRequest.Modify, CollectionAdminRequest.MoveReplica, CollectionAdminRequest.OverseerStatus, CollectionAdminRequest.RebalanceLeaders, CollectionAdminRequest.Reload, CollectionAdminRequest.RemoveRole, CollectionAdminRequest.ReplaceNode, CollectionAdminRequest.RequestStatus, CollectionAdminRequest.RequestStatusResponse, CollectionAdminRequest.Restore, CollectionAdminRequest.SetAliasProperty, CollectionAdminRequest.ShardSpecificAdminRequest, CollectionAdminRequest.SplitShard, CollectionAdminRequest.UtilizeNode`

### Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest

`SolrRequest.METHOD`

### Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter

`MapWriter.EntryWriter`

### Field Summary

Fields
`protected Boolean` `autoAddReplicas`
`protected String` `configName`
`protected String` `createNodeSet`
`protected Integer` `maxShardsPerNode`
`protected Integer` `nrtReplicas`
`protected Integer` `numShards`
`protected String` `policy`
`protected Properties` `properties`
`protected Integer` `pullReplicas`
`protected String` `routerField`
`protected String` `routerName`
`protected String[]` `rule`
`protected String` `shards`
`protected String[]` `snitch`
`protected Integer` `stateFormat`
`protected Integer` `tlogReplicas`
`protected String` `withCollection`

### Fields inherited from class org.apache.solr.client.solrj.request.CollectionAdminRequest.AsyncCollectionSpecificAdminRequest

`collection`

### Fields inherited from class org.apache.solr.client.solrj.request.CollectionAdminRequest.AsyncCollectionAdminRequest

`asyncId, waitForFinalState`

### Fields inherited from class org.apache.solr.client.solrj.request.CollectionAdminRequest

`action, MODIFIABLE_COLLECTION_PROPERTIES`

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

`SUPPORTED_METHODS, useBinaryV2, usev2`

### Constructor Summary

Constructors
`protected` `Create(String collection, String config, Integer numShards, Integer numNrtReplicas, Integer numTlogReplicas, Integer numPullReplicas)` Constructor intended for typical use cases
`protected` `Create(String collection, String config, String shards, int numNrtReplicas)` Constructor that assumes `ImplicitDocRouter.NAME` and an explicit list of `shards`

### Method Summary

All Methods Instance Methods Concrete Methods
`Boolean` `getAutoAddReplicas()`
`String` `getConfigName()`
`String` `getCreateNodeSet()`
`Integer` `getMaxShardsPerNode()`
`Integer` `getNumNrtReplicas()`
`Integer` `getNumPullReplicas()`
`Integer` `getNumShards()`
`Integer` `getNumTlogReplicas()`
`SolrParams` `getParams()`
`Properties` `getProperties()`
`Integer` `getReplicationFactor()`
`String` `getRouterName()`
`String` `getShards()`
`Integer` `getStateFormat()`
`String` `getWithCollection()`
`CollectionAdminRequest.Create` `setAutoAddReplicas(boolean autoAddReplicas)`
`CollectionAdminRequest.Create` `setCreateNodeSet(String nodeSet)`
`CollectionAdminRequest.Create` `setMaxShardsPerNode(Integer numShards)`
`CollectionAdminRequest.Create` `setNrtReplicas(Integer nrtReplicas)`
`CollectionAdminRequest.Create` `setPolicy(String policy)`
`CollectionAdminRequest.Create` `setProperties(Map<String,String> properties)`
`CollectionAdminRequest.Create` `setProperties(Properties properties)`
`CollectionAdminRequest.Create` `setPullReplicas(Integer pullReplicas)`
`CollectionAdminRequest.Create` `setReplicationFactor(Integer repl)`
`CollectionAdminRequest.Create` `setRouterField(String routerField)`
`CollectionAdminRequest.Create` `setRouterName(String routerName)`
`CollectionAdminRequest.Create` `setRule(String... s)`
`CollectionAdminRequest.Create` `setShards(String shards)` Provide the name of the shards to be created, separated by commas Shard names must consist entirely of periods, underscores, hyphens, and alphanumerics.
`CollectionAdminRequest.Create` `setSnitch(String... s)`
`CollectionAdminRequest.Create` `setStateFormat(Integer stateFormat)`
`CollectionAdminRequest.Create` `setTlogReplicas(Integer tlogReplicas)`
`CollectionAdminRequest.Create` `setWithCollection(String withCollection)`
`CollectionAdminRequest.Create` `withProperty(String key, String value)`

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

`getCollectionName`

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

`createResponse, getAsyncId, processAndWait, processAndWait, processAsync, processAsync, setAsyncId, setWaitForFinalState`

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

`addProperties, addReplicaByRouteKey, addReplicaProperty, addReplicaToShard, addReplicaToShard, addRole, backupCollection, balanceReplicaProperty, createAlias, createCollection, createCollection, createCollection, createCollectionWithImplicitRouter, createCollectionWithImplicitRouter, createShard, createTimeRoutedAlias, deleteAlias, deleteAllAsyncIds, deleteAsyncId, deleteCollection, deleteNode, deleteReplica, deleteReplica, deleteReplicaProperty, deleteReplicasFromAllShards, deleteReplicasFromShard, deleteShard, forceLeaderElection, getClusterStatus, getOverseerStatus, getV2Request, listCollections, migrateCollectionFormat, migrateData, modifyCollection, rebalanceLeaders, reloadCollection, removeRole, requestStatus, restoreCollection, setAliasProperty, setClusterProperty, setCollectionProperty, splitShard, toString, waitForAsyncRequest, writeMap`

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

`getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, getMethod, getPath, getQueryParams, getResponseParser, getStreamingResponseCallback, process, process, setBasicAuthCredentials, setMethod, setPath, setQueryParams, setResponseParser, setStreamingResponseCallback, setUseBinaryV2, setUseV2`

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

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

### Methods inherited from interface org.apache.solr.common.MapWriter

`jsonStr, toMap`

### Methods inherited from interface org.apache.solr.common.NavigableObject

`_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr`

### Field Detail

#### configName

    protected String configName

#### createNodeSet

    protected String createNodeSet

#### routerName

    protected String routerName

#### policy

    protected String policy

#### shards

    protected String shards

#### routerField

    protected String routerField

#### numShards

    protected Integer numShards

#### maxShardsPerNode

    protected Integer maxShardsPerNode

#### nrtReplicas

    protected Integer nrtReplicas

#### pullReplicas

    protected Integer pullReplicas

#### tlogReplicas

    protected Integer tlogReplicas

#### properties

    protected Properties properties

#### autoAddReplicas

    protected Boolean autoAddReplicas

#### stateFormat

    protected Integer stateFormat

#### rule

    protected String[] rule

#### snitch

    protected String[] snitch

#### withCollection

    protected String withCollection

### Constructor Detail

#### Create

    protected Create(String collection,
                     String config,
                     Integer numShards,
                     Integer numNrtReplicas,
                     Integer numTlogReplicas,
                     Integer numPullReplicas)

Constructor intended for typical use cases

#### Create

    protected Create(String collection,
                     String config,
                     String shards,
                     int numNrtReplicas)

Constructor that assumes `ImplicitDocRouter.NAME` and an explicit list of `shards`

### Method Detail

#### setCreateNodeSet

    public CollectionAdminRequest.Create setCreateNodeSet(String nodeSet)

#### setRouterName

    public CollectionAdminRequest.Create setRouterName(String routerName)

#### setRouterField

    public CollectionAdminRequest.Create setRouterField(String routerField)

#### setMaxShardsPerNode

    public CollectionAdminRequest.Create setMaxShardsPerNode(Integer numShards)

#### setAutoAddReplicas

    public CollectionAdminRequest.Create setAutoAddReplicas(boolean autoAddReplicas)

#### setNrtReplicas

    public CollectionAdminRequest.Create setNrtReplicas(Integer nrtReplicas)

#### setTlogReplicas

    public CollectionAdminRequest.Create setTlogReplicas(Integer tlogReplicas)

#### setPullReplicas

    public CollectionAdminRequest.Create setPullReplicas(Integer pullReplicas)

#### setReplicationFactor

    public CollectionAdminRequest.Create setReplicationFactor(Integer repl)

#### setStateFormat

    public CollectionAdminRequest.Create setStateFormat(Integer stateFormat)

#### setRule

    public CollectionAdminRequest.Create setRule(String... s)

#### setSnitch

    public CollectionAdminRequest.Create setSnitch(String... s)

#### getConfigName

    public String getConfigName()

#### getCreateNodeSet

    public String getCreateNodeSet()

#### getRouterName

    public String getRouterName()

#### getShards

    public String getShards()

#### getNumShards

    public Integer getNumShards()

#### getMaxShardsPerNode

    public Integer getMaxShardsPerNode()

#### getReplicationFactor

    public Integer getReplicationFactor()

#### getNumNrtReplicas

    public Integer getNumNrtReplicas()

#### getAutoAddReplicas

    public Boolean getAutoAddReplicas()

#### getNumTlogReplicas

    public Integer getNumTlogReplicas()

#### getNumPullReplicas

    public Integer getNumPullReplicas()

#### getStateFormat

    public Integer getStateFormat()

#### setShards

    public CollectionAdminRequest.Create setShards(String shards)

Provide the name of the shards to be created, separated by commas Shard names must consist entirely of periods, underscores, hyphens, and alphanumerics. Other characters are not allowed.

Throws:
  `IllegalArgumentException` - if any of the shard names contain invalid characters.

#### getProperties

    public Properties getProperties()

#### setProperties

    public CollectionAdminRequest.Create setProperties(Properties properties)

#### setProperties

    public CollectionAdminRequest.Create setProperties(Map<String,String> properties)

#### withProperty

    public CollectionAdminRequest.Create withProperty(String key,
                                                      String value)

#### getParams

    public SolrParams getParams()

Overrides:
  `getParams` in class `CollectionAdminRequest.AsyncCollectionSpecificAdminRequest`

#### setPolicy

    public CollectionAdminRequest.Create setPolicy(String policy)

#### getWithCollection

    public String getWithCollection()

#### setWithCollection

    public CollectionAdminRequest.Create setWithCollection(String withCollection)