Skip to content

ds_key index on mongo collections are not unique #14

@gerhardcit

Description

@gerhardcit

Is it by design that ds_key are not unique indexes on mongodb?

 this._collections[ collectionName ].ensureIndex({ ds_key: 1 })

Since the value cannot be duplicated, should it not be more optimized to use?

 this._collections[ collectionName ].ensureIndex({ ds_key: 1 }, {uniq:1})

Would it not be more optimized to use ds_key as as the _id of the record?
(Just asking what the design considerations were?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions