PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 21st of March, 2019

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[14:40:51] <augz> is there a way to do an $addToSet operation including an $inc operation to tally the number of times that item would be added to the set?
[14:41:46] <augz> my idea is telling me I can't use $inc as a column name, and I'm not wanting to, I want it to do the operation. However I think I may have the wrong idea on how it works because I get an exception. Using PHP driver
[15:10:47] <augz> I'm trying to have atomic documents counting relations from another collection. I have a 4 stage aggregation to create this data, then do a bulk insert into a new collection. Document has a SKU with an array of SKUs with a count variable (was naming it the sku) {$inc:{'skuVarHere':1}}
[17:12:35] <augz> I'll still be around if anyone wants to talk about that sort of thing
[17:40:05] <augz> https://stackoverflow.com/questions/7904928/mongodb-adding-to-a-set-and-incrementing
[17:40:39] <augz> This is what I'm trying to do essentially in a bulk update, replacing 'words.foo' with 'items.uniqueSKU'
[18:57:27] <augz> MongoDB/Driver/Exception/BulkWriteException with message 'The dollar ($) prefixed field '$inc' in 'items.items.0.$inc' is not valid for storage.'
[23:36:56] <patientplatypus> hi i have a question https://gist.github.com/patientplatypus/8f9e01fe6ad92da90969ecc10512b917