-
Notifications
You must be signed in to change notification settings - Fork 532
Why do clustered_index has an option at all? #2729
-
Hey,
I am interested in clustered collections for key-value use cases; BTW, I came from Mongoid.
In Mongoid's document (+ some info on this repo), I can specify
store_in collection_options: { clustered_index: { key: { _id: 1 }, unique: true, } }
in my model; I supposed.
Which is weird because
{ key: { _id: 1 }, unique: true, }
is the only possible value; they can't be anything else.
Why do we have options for key
and unique
at all?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Hey @midnight-wonderer,
Why do we have options for key and unique at all?
Just to clarify, the clustered_index
document is an option passed to the create
command to indicate to the MongoDB Server a Clustered Collection is being created.
Though no other values for key
and unique
are presently supported, the Driver's API is being designed to support future changes to the Server's command options.
Beta Was this translation helpful? Give feedback.