[15:21:26] <latestbot> I am doing the query like this: “db.testtable.findOne({'raw.snippet.title':"Team Depot and Husky Tackle Repairs for Veteran’s Family”})”
[15:34:11] <cheeser> do you have an index on that field?
[15:43:15] <Spynxic> Anyone know how to push values to an array? I have a collection that looks like so, {u'_id': ObjectId('longhex'), u'myarray': []}
[15:43:31] <Spynxic> however it isn't as simple as collection.update({"$push":{"myarray":1}}) (And if it matters, I'm using PyMongo)
[15:53:44] <Spynxic> cheeser: Because it's missing the query argument. Every example I find looks like so, collection.update({"_id":collectionid},{"$push":{"myarray":1}})
[15:54:18] <saml> yah the interface is a bit unnatural for python. it'll be more like x = db.collection.find_one(query); x.update({'$push': {'myarray':1}})
[15:54:43] <saml> but in pymongo, returned value of find_one is a simple dict
[16:22:03] <HarryKalahan> data and PosidoniaEvents
[16:22:15] <Spynxic> saml: Thanks, your solution worked out great. I just realized the objectid is returned when inserting an item into the collection so that eliminates the need to query
[16:22:55] <saml> HarryKalahan, that means there's no such user
[16:23:07] <HarryKalahan> the sm_gradiant user has role "read" over data
[16:23:20] <saml> but no such user on PosidoniaEven
[16:30:00] <HarryKalahan> i tried it to, but I obtain the same
[16:30:37] <HarryKalahan> > db.grantRolesToUser( "sm_gradiant", [ { role: "read", db: "PosidoniaEvents" } ] ) 2015-12-17T17:25:46.690+0100 E QUERY Error: Could not find user sm_gradiant@admin at Error (<anonymous>) at DB.grantRolesToUser (src/mongo/shell/db.js:1298:15) at (shell):1:4 at src/mongo/shell/db.js:1298
[16:33:59] <saml> did you create role named "read" ?
[16:34:32] <HarryKalahan> i supose read role is one of the mongo's
[16:39:59] <HarryKalahan> well, i couldn't use grantrolestouser
[16:40:41] <HarryKalahan> i've created the same user pointing to PosidoniaEvents
[16:42:25] <HarryKalahan> so in system.users collection i obtain the same user twice witd _id: agata_data.sm_gradiant and _id: PosidoniaEvents.sm_gradiant
[16:43:06] <HarryKalahan> it works, but I don't know why I can't use grantrolestouser
[16:56:16] <tkotthakota> Java.Util.Date issue: Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.Date out of START_OBJECT token
[16:56:23] <tkotthakota> Any thoughts on why I see above error when fetching a mongo doc which has Date attribute (stored as NumberLong("12334"))?
[16:57:11] <cheeser> why aren't you storing dates as Dates?
[16:58:32] <tkotthakota> So my object has java.util.Date attributes..
[16:58:57] <tkotthakota> They are stored as "timeCreated" : NumberLong("1450210326397")
[16:59:23] <tkotthakota> In fact, I am little puzzled as well as I expect it to be stored as ISODate..
[16:59:46] <cheeser> if you can fix that, that'd be better.
[16:59:48] <tkotthakota> When I fetch the document I get above exception
[19:46:22] <uuanton> first time asking question here. I'm working on 2.6.11 mongodb restore script on centos 7 and the database pretty big so that when you start it takes more than TimeoutStartSec=5min to start therefore it fails to start. Can't find the way to update TimeoutStartSec or other solution