PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 30th of May, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[03:24:38] <s2013> im a bit confused about the way to properly use the node.js library.. do i need to do MongoClient.connect each time?
[04:20:52] <Streemo> {location: geoJSON, score: randomRealNumber, author: someAuthor} trying to get the score of an author within a location, scores are summed linearly. db.docs.aggregate([match, group]. Match docs geoWithin. group by author, sum on score.
[04:21:21] <Streemo> I need the returned documents to be sorted. Ideally, I could do something like .aggregate([match,group,near])
[04:21:28] <Streemo> sorted by near that is
[04:22:27] <Streemo> aggregate i necessary because i need to GROUP docs. but i need the returned docs to be sorted by loc. geoNear aggregation takes over my entire agg pipeline meaning i cannot group my docs too... unfortunately.
[04:22:46] <Streemo> any ways around that?
[04:23:58] <Streemo> it doesnt mke sense to geoNear before group because wont the sorting just be lost? thats really confusing to me.
[04:26:12] <Streemo> nope, i am dead wrong.
[04:26:25] <Streemo> i can geoNear, keep distance, group, sort by distance
[04:26:30] <Streemo> silly meh
[04:28:09] <Streemo> OK, next question.
[04:28:35] <Streemo> in the $geoNear aggregation, is is more efficient to specify a max distance, or specify a $geoWithin uery in the query option?
[04:52:13] <svm_invictvs> hrm
[12:04:35] <vhf> Hey
[12:08:33] <vhf> I got an index on 'a', which one is more effective:
[12:08:35] <vhf> update({'a': {$lt: 10}}, {$set: {'b': false}}, {'upsert': false, 'multi': true});
[12:08:37] <vhf> or
[12:08:39] <vhf> update({'a': {$lt: 10}, 'b': true}, {$set: {'b': false}}, {'upsert': false, 'multi': true});
[12:53:34] <edeca> Can the $regex operator only be used on string fields? Or can I use it to search bindata too?
[13:12:33] <edeca> Ah, answer to my question from 2011: https://groups.google.com/forum/#!topic/mongodb-user/L_rWsWzHrX4
[13:23:25] <cheeser> regex on binData sounds weird anyway
[13:37:56] <edeca> cheeser: Basically I want to do a "does it contain" search
[13:38:10] <edeca> cheeser: Unfortunately I can't really encode as utf8 and store a string, because it's real binary data
[13:38:22] <edeca> cheeser: Yes I know this will be horribly inefficient
[15:39:29] <kuter> hello
[15:39:51] <compeman> hi
[15:39:55] <kuter> i've got question, how to multiple value on update without mul (i'm on 2.4) ?
[15:40:38] <kuter> i've never seen before mongo .. that's my first time.
[15:41:01] <kuter> do i have to upgrade mongo ?
[15:41:06] <kuter> or there is another way ?
[15:41:13] <compeman> you can save your package & it's version to the json file for automatic future installs? give an example for your query
[15:42:08] <kuter> db.Produkt.update({'category': 'music'}, {$set: {'price': current_price * 0.5}}, {multi:true});
[15:42:48] <kuter> if forEach is correct way ?
[15:42:50] <compeman> there must be findUpdate or smt like that
[15:44:08] <kuter> compeman: but still i have to use $mul which doesn't exist in 2.4
[15:44:26] <compeman> why not to update to 3?
[15:44:55] <kuter> compeman: .. good question, i'm on suse which provide 2.4 out of box
[15:45:24] <compeman> hmmm
[15:47:33] <kuter> compeman: ok, now i see
[15:47:38] <kuter> they have repo
[15:47:43] <compeman> yeap
[15:48:08] <compeman> it would be better if you learn mongo with latest release
[15:48:21] <compeman> good luck
[15:48:44] <kuter> compeman: actually, i have to learn this because of school
[15:48:52] <compeman> uh
[15:48:58] <compeman> so ask your instructor
[15:49:01] <kuter> postgres here
[15:49:09] <compeman> he/she may want you to study on 2.x
[15:50:49] <kuter> thanks for help anyway ..
[15:51:09] <compeman> no prob.
[15:51:10] <kuter> i found $mul in docs.
[15:53:08] <kuter> it's completly different approach to db ..
[19:27:56] <gothos> Hey guys. I'm using casbah and mongodb 3. I call the aggregate method but nothing is return, when I enter some data and call aggregate again I get a lot of data returned
[19:28:15] <gothos> not just the data I just entered. Any idea what might be the cause?
[20:46:09] <davesleep> right, i got a question
[20:46:20] <davesleep> but i'm; not sure how to phrase is
[20:46:30] <davesleep> infact, im confused
[20:46:34] <davesleep> nevermind
[20:46:38] <vhf> :D
[20:59:42] <kexmex> Hi. I am using Chef to setup my server. How can I pre-create users?
[21:00:19] <kexmex> i am trying to use mongoshell with --eval
[21:00:41] <kexmex> but how do i login as admin and add to a specific databse? I can't see to be able to use "use myotherdb" in .js file
[21:02:19] <kexmex> Error: couldn't add user: not authorized on myotherdb to execute command
[21:02:33] <kexmex> even though the user that i am calling mongo command with is "adminsterAnyDatabase"
[21:16:50] <erenburakalic> Hi guys
[23:07:15] <ChALkeR> Are there any news concerning debian stable packages?