|
The clusteredIndex option for create should eventually take the following for — for now, key is limited to {_id: 1}
{
|
create: <collection name>,
|
clusteredIndex: {
|
// <key pattern>
|
// (a) uses existing index key specification structure -
|
// all fields must be ascending (1), descending (-1) or "hashed"
|
// (b) multi-key cluster keys are prohibited
|
key: <key pattern>, // required
|
unique: <bool>, // required, must be ‘true’
|
name: <string>, // optional, otherwise automatically generated
|
v: <int>, // optional, must be ‘2’ if provided
|
},
|
// expireAfterSeconds only available when <cluster key> is a single field. expireAfterSeconds: <String or NumberLong> // optional
|
}
|
Included in this task:
- create a ClusteredCollectionOptions idl struct
- modify create.idl's clusteredIndex option to take in either a boolean or ClusteredCollectionOptions
- modify CollectionOptions and CollectionImpl to distinguish between collections that use the new and old format
|