Class CreateCollectionAPI.CreateCollectionRequestBody
- java.lang.Object
-
- org.apache.solr.handler.admin.api.CreateCollectionAPI.CreateCollectionRequestBody
-
- All Implemented Interfaces:
org.apache.solr.common.MapSerializable
,org.apache.solr.common.MapWriter
,org.apache.solr.common.NavigableObject
,JacksonReflectMapWriter
,org.noggit.JSONWriter.Writable
- Enclosing class:
- CreateCollectionAPI
public static class CreateCollectionAPI.CreateCollectionRequestBody extends Object implements JacksonReflectMapWriter
Request body for v2 "create collection" requests
-
-
Field Summary
Fields Modifier and Type Field Description String
alias
String
async
String
config
Boolean
createReplicas
String
name
List<String>
nodeSet
Integer
nrtReplicas
Integer
numShards
Boolean
perReplicaState
Map<String,String>
properties
Integer
pullReplicas
Integer
replicationFactor
CreateCollectionAPI.RouterProperties
router
List<String>
shardNames
Boolean
shuffleNodes
Integer
tlogReplicas
Boolean
waitForFinalState
-
Constructor Summary
Constructors Constructor Description CreateCollectionRequestBody()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToRemoteMessageWithPrefix(Map<String,Object> remoteMessage, String prefix)
static void
convertV2CreateCollectionMapToV1ParamMap(Map<String,Object> v2MapVals)
Convert a map representing the v2 request body into v1-appropriate query-parameters.static CreateCollectionAPI.CreateCollectionRequestBody
fromV1Params(org.apache.solr.common.params.SolrParams params, boolean nameRequired)
void
validate()
-
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.jersey.JacksonReflectMapWriter
writeMap
-
-
-
-
Field Detail
-
name
public String name
-
replicationFactor
public Integer replicationFactor
-
config
public String config
-
numShards
public Integer numShards
-
pullReplicas
public Integer pullReplicas
-
tlogReplicas
public Integer tlogReplicas
-
nrtReplicas
public Integer nrtReplicas
-
waitForFinalState
public Boolean waitForFinalState
-
perReplicaState
public Boolean perReplicaState
-
alias
public String alias
-
async
public String async
-
router
public CreateCollectionAPI.RouterProperties router
-
createReplicas
public Boolean createReplicas
-
shuffleNodes
public Boolean shuffleNodes
-
-
Method Detail
-
fromV1Params
public static CreateCollectionAPI.CreateCollectionRequestBody fromV1Params(org.apache.solr.common.params.SolrParams params, boolean nameRequired)
-
validate
public void validate()
-
addToRemoteMessageWithPrefix
public void addToRemoteMessageWithPrefix(Map<String,Object> remoteMessage, String prefix)
-
convertV2CreateCollectionMapToV1ParamMap
public static void convertV2CreateCollectionMapToV1ParamMap(Map<String,Object> v2MapVals)
Convert a map representing the v2 request body into v1-appropriate query-parameters.Most v2 APIs using the legacy (i.e. non-JAX-RS) framework implement the v2 API by restructuring the provided parameters so that the v1 codepath can be called. This utility method is provided in pursuit of that usecase. It's not used directly CreateCollectionAPI, which uses the JAX-RS framework, but it's kept here so that logic surrounding collection-creation parameters can be kept in a single place.
-
-