These are chat archives for Automattic/mongoose

Sep 2018
Thomas Sieverding
Sep 26 2018 00:42
Does a hash index on a subdocument hash only that subdocument?
For instance if I did schema.ensureIndex({ ‘user.profile.hash’, ‘hashed’ })
Sep 26 2018 01:07
@Bajix I'm not sure I totally understand your question. The index is created at the collection level with each document getting a unique hash based on the value of the field you specify in the index definition. I don't have any meaningful experience with sharding yet, so I haven't used a hashed index before.