Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Why do clustered_index has an option at all? #2729

Unanswered
midnight-wonderer asked this question in Q&A
Discussion options

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?

You must be logged in to vote

Replies: 1 comment

Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /