- 
    Type:Task 
- 
    Resolution: Fixed
- 
    Priority:Major - P3 
- 
    Affects Version/s: None
- 
    Component/s: None
- 
        Fully Compatible
- 
        Execution Team 2021-09-20, Execution Team 2021-10-04
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
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
- is duplicated by
- 
                    SERVER-59799 Display clusteredIndex in listCollections for clustered collections -         
- Closed
 
-