These are chat archives for Automattic/mongoose

Mar 2016
Erinç Fırtına
Mar 29 2016 09:28
@LeonineKing1199 I dont suggest you to do that if documents will be changed. Because at first instert mongodb alloc some space for that document and put that document that alloced space. If you add some other data to the same document and if document size exceeds alloced size then mongodb alloc new bigger space and move the document to new alloced place in disk. So this operation can cause some performance issue also old alloced space will be stay till compact.
And if your use of that document 90% for A.11 and 10% for others, Mongo stores whole document on working set only for A.11
Bnaya Peretz
Mar 29 2016 14:38
What should be the type of property in the model with dynamic structure?
its an object, but i'm not sure how he will look like
new Schema({
    type: String,
    // ???
    metadata: Object
}, {
    timestamps: true
Bnaya Peretz
Mar 29 2016 14:45
Ok i guess i should use Mixed
Mar 29 2016 15:24
@EricMcRay Thanks!