PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 5th of October, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:25:25] <SubCreative> What would be the best method for handling Oauth2 tokens in a session store like mongo?
[01:25:38] <SubCreative> Im use to storing express.js sessions in mongo but have not implemented Oauth2 before.
[08:01:09] <agend> hi - have a question about 3 node cluster - primary + 2 secondaries - if I understand correctly if 2 secondaries go down - master would step down so my cluster would be readonly - is there any way to make the master not to step down? it would have a higher priority
[08:34:25] <johnjacob> if I have a collection (i.e. Users) with a nested schema (i.e. Friends - which stores IDs to other users), how can I add/update data into the nested schema of a certain user
[08:55:55] <agend> johnjacob: using nested key?
[11:52:21] <kjellski> has anyone a good tutorial at hand that shows how to cope with saving two related collection entries together? I've got a user that has stories, when I create the story with the users id, how should I push the created story into the users stories?
[12:12:18] <kjellski> ugh, I really have to do one at a time it seems... thanks nevertheless...
[15:38:31] <ertertretrer> hiya - got a bit of a strange one in 2.6.4 - no matter what I specify for pidFilePath, it always returns permission denied (to state the obvious, yes the user has perms in the location specified)
[15:38:55] <ertertretrer> couldnt see anything in jira, is this known?
[17:43:48] <zonik> Hello all, i have problem sorting, please help: http://pastie.org/pastes/9622702/text?key=qhg6elwgefb5qjr3bhxhwq
[17:50:57] <kali> zonik: db.queue.find({status: 1}).sort({priority: -1}})
[17:51:04] <kali> minus the last }
[17:58:08] <zonik> thanks kali but i am using monk for nodejs and i do like this:
[17:58:14] <zonik> _queue.findAndModify({ query: {status: 0}, sort: {priority: -1, _id: 1}, update: {$set: {status: 1}} }, function(err, doc) {
[18:00:52] <kali> if queue is big (>1000) you need an index on { status:1, priority:-1, _id:1 }
[18:01:06] <kali> sometimes, sort fails silently if there are no index
[18:30:48] <zonik> kali, it works now with this: db.queue.ensureIndex({status: 0, priority:-1, _id:1})
[18:30:52] <zonik> thanks a lot!
[20:13:25] <Lope> db.col.ensureIndex({a:1}); db.col.ensureIndex({b:1}) db.col.ensureIndex({c:1}) etc... how can I create many separate indexes with 1 call?
[20:13:59] <derekv> so maybe, i'm just misunderstanding how the whole document store thing is used:
[20:15:02] <derekv> supposed what I want to do is, collect messages from several sources, of different structure (not json, maybe one is just tab delimited, anouther is an email, another is something else…)
[20:15:44] <derekv> but from what I see, mongodb (and other document stores), stores in bson.. which requires me to have foreknowlege of how to parse the data and what I want out of it
[20:16:19] <derekv> instead I'd like to seperate out those concerns, eg storage of the data and interpretation of it… as the later may evolve over time
[20:16:54] <derekv> Does that make sense?
[20:17:42] <Lope> if I have an index like this: db.foo.ensureIndex({a:1,b:1,c:1}) is there any point in creating an index {a:1,b:1} ?
[20:17:51] <Lope> or can it just use the previous index?
[20:23:58] <Lope> ok, found the answer. it can. http://docs.mongodb.org/manual/core/index-compound/#prefixes
[21:17:03] <derekv> ok, I think I might be able to rephrase my question a little bit..
[21:17:42] <derekv> suppose I have data incoming that is of arbitrary (not random) format, eg might be csv, or an email, or whatever
[21:18:26] <derekv> and right now, I don't want to be bothered trying to figure out all of the interesting parts of that data, I just want to capture it
[21:21:11] <derekv> but I would like to be able to easily, incrementally, start extracting out bits that are interesting. so for example, i might be interested in charting "temperature" and "pressure" over time, and I can say that temperature and pressure are the third and fifth fields respectivly, from sources A,B and C, and for sources D and F, they are in a json already, so i look for the "pres" and "temp" keys, then convert units
[21:23:49] <derekv> how would you support this scenario in mongodb?
[22:14:18] <fpghost84> Is there a way to kind of apply find again to the result of a find()? Like if I grabbed some records with var c=db.mycoll.find(), did some analysis, and finally wanted to do some akin to c.find(....)?
[23:35:36] <Pycasso> help, im following http://docs.mongodb.org/ecosystem/tools/http-interfaces/#simple-rest-interface
[23:36:21] <Pycasso> however when I visit my url http://127.0.0.1:28017/pyDB/posts/ I don't see my entries
[23:37:13] <Pycasso> but in terminal usning mongo; use pyDB; db.posts.find().pretty(); I can see all my entries
[23:37:38] <Pycasso> what am i missing? Im trying to use mongodb native rest api