Optional
cacheWhether the in-memory hash cache is enabled for this collection.
Optional
computedComputed values to apply to documents in this collection.
Optional
distribute(Enterprise Edition cluster only.) If set to a collection name, sharding of the new collection will follow the rules for that collection. As long as the new collection exists, the indicated collection can not be dropped.
Optional
enforce(Cluster only.) Unless set to false
, the server will check whether
enough replicas are available at creation time and bail out otherwise.
Default: true
Optional
keyAn object defining the collection's key generation.
Optional
number(Cluster only.) Number of shards to distribute the collection across.
Default: 1
Optional
replication(Cluster only.) How many copies of each document should be kept in the cluster.
Default: 1
Optional
schema?: SchemaOptionsOptions for validating documents in the collection.
Optional
shard(Cluster only.) Document attributes to use to determine the target shard for each document.
Default: ["_key"]
Optional
sharding(Cluster only.) Sharding strategy to use.
Optional
smart(Enterprise Edition cluster only.) Attribute used for sharding.
Optional
smart(Enterprise Edition cluster only.) Attribute containing the shard key value of the referred-to smart join collection.
Optional
waitIf set to true
, data will be synchronized to disk before returning from
a document create, update, replace or removal operation.
Default: false
Optional
wait(Cluster only.) Unless set to false
, the server will wait for all
replicas to create the collection before returning.
Default: true
Optional
write(Cluster only.) Write concern for this collection.
Options for creating a collection.
See database.Database#createCollection, database.Database#createEdgeCollection and DocumentCollection#create or EdgeCollection#create.