<   January 2012   >
Su Mo Tu We Th Fr Sa
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
00:01 kevwil joined
00:03 infynyxx joined
00:05 rick446 joined
00:10 __lucio__ joined
00:17 heckacopter joined
00:17 skot joined
00:20 _srp joined
00:21 DofLeFou joined
00:22 _srp joined
00:35 hasenj joined
00:36 dkliban joined
00:37 __lucio__ joined
00:39 sdwrage joined
00:48 ron_frown joined
00:50 kevwil joined
00:52 ixixi joined
00:55 houhoulis joined
01:04 MacYET joined
01:07 ixixi joined
01:10 heckacopter_ joined
01:11 ixixi_ joined
01:13 thelinuxkid joined
01:13 versicolor joined
01:26 superball joined
01:27 alxgsv joined
01:29 ron_frown joined
01:37 dkliban_ joined
01:39 <suprball> umm is it OK to ask a quick question here? ;<
01:39 <alxgsv> you just did!
01:40 <suprball> Woho!
01:41 wallerdev joined
01:41 <suprball> Well, I'm just wondering (and I've googled, but hasn't found an answer) if the php-driver for mongo supports the "_addSpecial"-stuff?
01:43 <suprball> (since I need to specify maxScan and similar stuff)
01:46 bulatshakirzyano joined
01:54 p1d joined
01:57 h0bbit joined
01:59 ezmobius joined
02:00 looopy joined
02:03 spicyWith joined
02:05 marthinal joined
02:16 jgornick joined
02:22 tdegrunt joined
02:25 skylamer` joined
02:25 __lucio__ joined
02:25 <skot> yeah, you want this : http://us.php.net/manual/en/mongocursor.addoption.php
02:34 ron joined
02:35 ph^ joined
02:36 [zaf]-Coral joined
02:39 _srp joined
02:48 nitin joined
02:53 jvalduvieco joined
03:03 spicyWith joined
03:04 [AD]Turbo joined
03:05 <[AD]Turbo> hola
03:07 superjudge joined
03:08 jeffbcross joined
03:12 jvalduvieco joined
03:15 tdegrunt joined
03:16 tdegrunt joined
03:17 G4b joined
03:18 sjaak_trekhaak joined
03:19 thalll joined
03:20 ixixi joined
03:21 Ultrabug joined
03:21 Ultrabug joined
03:23 nitin joined
03:23 balboah joined
03:25 mehlah joined
03:27 wereHamster joined
03:30 wilmoore joined
03:33 djcoin joined
03:33 [AD]Turbo joined
03:36 superjudge joined
03:37 _srp joined
03:40 firelynx joined
03:42 ukd1 joined
03:51 rycrostud joined
03:52 [AD]Turbo joined
03:55 Jippi joined
03:55 AvianFlu joined
03:55 GabrielVieira joined
03:58 jvalduvieco joined
04:02 shaitanich joined
04:02 aliem joined
04:03 balboah joined
04:04 jvalduvieco joined
04:06 niftylettuce_ joined
04:07 ukd1_ joined
04:10 elHannes joined
04:13 Geeknux joined
04:14 eka joined
04:17 Cancerus joined
04:18 Pagebakers joined
04:22 thalll joined
04:25 rycrostud joined
04:30 robhawkes joined
04:32 versicolor joined
04:39 kao joined
04:41 xaep joined
04:42 mehlah joined
04:46 ixixi_ joined
04:51 Casan joined
04:53 Casan joined
04:53 karavanjo joined
04:54 [zaf]-Coral joined
04:56 S1kx joined
04:56 S1kx joined
04:58 tjadc joined
05:00 rycrostud left
05:02 remonvv joined
05:03 abstrusenick joined
05:04 diogogmt joined
05:05 <remonvv> Hi, I can't quite figure this out based on the code; does a MongoDB write lock prevent reads? Does it disallow the acquisition of read locks when it has a write lock?
05:06 <MacYET> it does not
05:08 Vile joined
05:10 Casan joined
05:11 [raymond] joined
05:11 [raymond] joined
05:14 josephwilk joined
05:16 spicyWith joined
05:17 [AD]Turbo joined
05:17 aliem joined
05:26 vguerra joined
05:43 wereHamster joined
05:45 j0su3 joined
05:47 <remonvv> Right, that's what I thought. But that makes this "The mongod process uses a modified reader/writer lock with dynamic yielding on page faults and long operations. Any number of concurrent read operations are allowed, but a write operation can block all other operations." a rather confusing statement.
05:48 Cancerus1 joined
05:49 <remonvv> Well, actually, what I thought is that it followes standard RW lock semantics (1 concurrenr write, read lock acquisition is blocked until write lock is released, and reads can happen concurrently).
05:51 grmblfrz joined
05:52 Lujeni joined
05:53 <Lujeni> remonvv: What's is your question remonvv ?
05:53 <remonvv> If MongoDB write lock prevents reads during it.
05:54 <remonvv> The documentation implies it does.
05:54 <Lujeni> remonvv: To my mind, use replica set with query/read on slave it's best way
05:55 <remonvv> Well, that has nothing to do with the question though. The documentation implies a write lock blocks "all operations". I do not think that is true. Rather it blocks operations that also require a write lock.
05:56 <remonvv> I was just curious if I misunderstood.
05:56 <MacYET> it must be hard reading docs the wrong way
05:57 <ron> not as hard as it is to write the docs the wrong way.
05:57 <remonvv> You can't read documentation the wrong way, you can only write them the wrong way.
05:57 <remonvv> Oh, great minds.
05:57 <remonvv> Not strictly true ofcourse, but generally true.
05:58 <remonvv> Confusion is usually the result of vague or ambiguous writing rather than questionable reading.
06:01 Zelest joined
06:01 Qben joined
06:13 Qpac joined
06:14 stask312 joined
06:24 p1d joined
06:29 thalll joined
06:31 remonvv joined
06:34 HardFu joined
06:37 p1d joined
06:44 xaep joined
06:48 Cancerus joined
06:48 <Cancerus> what is "machine id"?
06:48 <MacYET> documented in the ObjectId docs
06:49 <Cancerus> thanks
06:52 simplechat joined
06:52 simplechat joined
07:04 tdegrunt_ joined
07:10 yfeldblum joined
07:21 Cancerus joined
07:22 houhoulis joined
07:25 xaep joined
07:30 stevie-bash joined
07:33 grmblfrz joined
07:34 niemeyer joined
07:50 ignarps joined
08:00 remonvv joined
08:01 whaley joined
08:03 Error404NotFound joined
08:04 billhay joined
08:08 IAD joined
08:13 ron joined
08:14 ron joined
08:14 nathenharvey_ joined
08:16 imran_ joined
08:17 <imran_> can you do nested queries in mongodb without specifying the intermediate keys ?
08:17 <MacYET> do what?
08:17 <imran_> for for example if you had the doc {
08:17 <imran_> 'a': {' score': 10 }
08:17 ron joined
08:17 <imran_> 'b': {'score':20}
08:17 <imran_> }
08:17 <MacYET> no you can't
08:17 p1d joined
08:18 <imran_> could you do a query that returned all documents which had fields which had fields which matched a criteria (score > x)
08:18 <MacYET> didn't I say no?
08:18 <imran_> ok, just making sure it was clear what I was saying :)
08:19 <* MacYET> shakes head
08:21 ron joined
08:24 dkliban joined
08:25 ron joined
08:27 <alnewkirk> ha wtf
08:31 BurtyBB joined
08:32 <balboah> is the count on a collection supposed to jump up/down while mongos is rebalancing shards?
08:33 p1d joined
08:36 h0bbit joined
08:37 <skot> it can, depending on a few factors. How are you counting?
08:38 <skot> Are you using a query?
08:39 <skot> Here is an issue you might want to track: https://jira.mongodb.org/browse/SERVER-3645
08:41 BurtyB joined
08:42 robhawkes joined
08:44 josue joined
08:44 h0bbit joined
08:44 Jesmith17 joined
08:46 <remonvv> skot, any idea what this is "combinatorial limit of $in partitioning of result set exceeded"? Triggered at line 917 in queryutil.cpp
08:46 <remonvv> We're hitting it with relatively small $in clauses (1000-1300 elements)
08:47 <remonvv> Not familiar enough with the code to know what "size" refers to in uassert( 13385, "combinatorial limit of $in partitioning of result set exceeded", size() < 1000000 );
08:49 Pagebakers joined
08:53 cybertoast joined
08:53 <balboah> skoef: I'm simply doing db.collection.count() in the mongos
08:54 <balboah> skot: mt
08:56 lazyshot joined
08:58 jvalduvieco joined
08:59 <skot> balboah: yep, that is the bug/improvement
08:59 <balboah> skot: good to know, thanks
08:59 <skot> remonvv: no, and i'm running out the door, can you post the query form?
08:59 <skot> Are you using more than one $in in the query?
09:00 <skot> (and what version?)
09:02 yfeldblum joined
09:02 <remonvv> 2.1, one $in, objectId list
09:02 <remonvv> it's literally {a:1, b:{$in:[ObjectId(...), ...]}}
09:02 <remonvv> same issue on 2.01
09:03 <remonvv> 2.0.1
09:03 <remonvv> It's to a sharded collection, if that changes anything
09:04 <remonvv> On non-sharded it doesn't seem to happen. But I can't really think of a reason why that would make a difference so I think that might be coincedence.
09:04 jvalduvieco joined
09:05 h0bbit joined
09:07 LuchoVtn3d joined
09:09 jvalduvieco joined
09:11 <remonvv> Oh, it is sharding related by the looks of it.
09:11 <remonvv> https://jira.mongodb.org/browse/SERVER-4778
09:14 meghan joined
09:15 Casan joined
09:15 ixixi joined
09:17 meghan joined
09:18 napperjabber joined
09:19 remonvv joined
09:23 corruptmemory joined
09:25 kevwil joined
09:27 h0bbit joined
09:28 redir joined
09:35 jonwage_ joined
09:37 rick446 joined
09:37 CannedCorn joined
09:42 bsegal joined
09:42 kevwil joined
09:44 houhoulis joined
09:45 Pagebake_ joined
09:47 Ultrabug joined
09:47 Ultrabug joined
09:48 neurodrone joined
09:49 mramm joined
09:52 SkyRocknRoll joined
09:52 SkyRocknRoll joined
09:52 JaredMiller joined
10:01 skot joined
10:01 houhouli_ joined
10:02 remonvv joined
10:02 jdawgaz joined
10:02 doxavore joined
10:03 jdawgaz left
10:03 JaredMiller_ joined
10:05 diogogmt joined
10:05 kevwil left
10:06 grmblfrz joined
10:14 joshsmith joined
10:15 houhoulis joined
10:17 nibblebot joined
10:19 radiocats joined
10:22 kpshek joined
10:25 robo joined
10:26 Tankado joined
10:27 jeffbcross joined
10:28 <Tankado> Hello all, I am new to DB, i am reading alot about mongo and i sometimes see about saving entrie documents, i also read about BSON and saw the syntax but i dont understand how a text document can be index in MongoDB ?
10:28 jeffbcross left
10:28 <MacYET> mongodb has no fulltext search
10:29 <MacYET> next in line
10:29 crodas joined
10:30 apwalk joined
10:31 jhawk28 joined
10:31 jaha joined
10:32 tncardoso joined
10:32 <Tankado> Ok and is there any serialization\deserialization client of C++ objects, similar to
10:32 <Tankado> GSON (Google java serialization to JSON)
10:34 krawek joined
10:37 dob joined
10:39 cybertoast joined
10:41 jsuggs joined
10:43 marthinal joined
10:50 doxavore joined
10:51 Vile joined
10:52 davidwalsh joined
10:52 marthinal_ joined
10:56 IAD1 joined
10:58 tdegrunt joined
11:02 RORgasm joined
11:03 RORgasm joined
11:05 ekryski joined
11:05 zirpu left
11:05 neurodrone joined
11:06 [AD]Turbo joined
11:07 <asciiduck> I'm wirting something to parse mongodb's server status and put it into Graphite, does MongoDB support any type of index besides btree? (just curious as the indexCounters object has a subobject of 'btree')
11:09 rick446 joined
11:09 <skot> no, just btree.
11:11 tjadc joined
11:12 hmarr joined
11:12 IAD joined
11:12 devdazed joined
11:13 stask312 joined
11:14 <jwage> What would a better more efficient way to do this query? {"metadata.objectHistory":{"$exists":true}} ?
11:15 <jwage> maybe this? {"metadata.objectHistory":{"$ne":null}}
11:15 redir joined
11:16 MacYET joined
11:16 thomasdebenning joined
11:18 <jwage> skot, any suggestions on the above query?
11:22 looopy joined
11:23 roflcerofthelawl joined
11:26 Destos joined
11:26 napperjabber joined
11:28 <remonvv> If there's an index on that metadata or metadata.objectHistory then the latter is more efficient. If not it doesn't matter.
11:28 <remonvv> .explain() could've told you that ;)
11:29 <balboah> I'm getting this when trying to shard a collection: exception: invalid parameter: expected an object ()
11:29 <balboah> I have no clue of what that means as the same command works on another database with the same structure
11:29 <remonvv> Paste your entire command, looks like a syntax error
11:29 ghg joined
11:30 <balboah> remonvv: http://pastebin.com/6rHumnSM
11:33 Pagebakers joined
11:34 <balboah> remonvv: any idea of what may be the cause when same command (and same index keys but different values) works for a different database?
11:34 <remonvv> Looks okay, db.version()?
11:35 CannedCorn left
11:35 <balboah> it's 2 shards running 2.0.2 on linux debian
11:35 <balboah> except for mongos which runs on freebsd
11:36 <remonvv> Hm, not a clue. The command is valid.
11:36 <remonvv> Tried "shardcollection"?
11:36 Bill joined
11:36 <remonvv> Maybe there's a weird case sensitivity issue on that build.
11:36 <remonvv> I just ran it on 2.0.1 and 2.1
11:36 <remonvv> Both work
11:39 <balboah> remonvv: no go, except for also lowercasing the collection but then it created an empty one
11:40 <balboah> maybe I'll just report it
11:45 <remonvv> Yeah there's nothing wrong with the command so probably a OS specific bug.
11:46 j0su3 joined
11:46 thewildpendulum joined
11:48 jshirley joined
11:50 wad joined
11:50 wtpayne joined
11:50 jshirley joined
11:50 <balboah> remonvv: reported. Had the same problem trying a linux mongos
11:50 andreassaebjoern joined
11:51 <remonvv> Hm, well we run all our stuff on that and no issues so far.
11:51 <balboah> yeah I have 5 databases where all but one works
11:52 jsuggs joined
11:54 doubletap joined
11:54 <thewildpendulum> i'm trying to store backbones models using mongoose and all the code i've read so far isn't very straightforward about how this actually done. is it as simple as opening a connection and calling save() or do i need to define a sync method?
11:55 elHannes left
11:56 doubletap left
11:57 nibblebo_ joined
11:58 <IAD> if i need work with unknown count of values of collection(limit by script time execution), prefered use iterator or findOne a lot times? I have 100-500 iterations per one script execution.
11:58 mbj joined
11:58 <Tankado> What kind of types can serve as "indexes" in MongoDB ? from last response i get it i cant use and search string indexes
11:59 <MacYET> what kind of types?
11:59 andreass_ joined
12:01 heckacopter_ joined
12:02 <remonvv> Tankado, you can use strings fields as (part of) an index.
12:02 <remonvv> IAD, use a cursor + getmore()
12:03 <remonvv> getmore is almost always wrapped in the driver by an iterator, so yes, iterator.
12:03 wtpayne2 joined
12:03 wtpayne left
12:03 wtpayne2 left
12:04 wtpayne2 joined
12:04 <IAD> remonvv: ty
12:06 <Tankado> yeah i get it now, sorry for the stupid question.
12:06 <remonvv> no problem ;)
12:07 cybertoast joined
12:07 <wtpayne2> Hi. I am trying to figure out how best to handle AutoReconnect exceptions.
12:07 <wtpayne2> I assume I have to wait for a bit before trying the next query.
12:08 <wtpayne2> Any idea what a suitable period might be?
12:08 JaredMiller left
12:10 <remonvv> What language/platform are you talking about?
12:10 <wtpayne2> pymongo
12:10 <remonvv> You're either connected or you're not.
12:11 <remonvv> And it doesn't give you any indication the connection has been reestablished?
12:11 ron joined
12:11 <wtpayne2> I have not encountered any problems yet,
12:11 <remonvv> Are you sure this is actually an issue you have to work around?
12:11 <wtpayne2> But the AutoReconnect exception must exist for some reason.
12:11 <wtpayne2> :-)
12:11 <remonvv> It should maintain a large pool of connections and only use ones that are, you know, connected
12:12 <remonvv> It exists so you can know that the operation you were trying to do might (and probably will have) failed
12:12 <wtpayne2> So any exceptions that I get (other than StopIteration) are genuine errors.
12:13 <remonvv> I'm not a pymongo expert, but every unique exception should be there for a reason and should be dealt with as is documented. But yes, generally speaking that's a fair assumption.
12:13 RobWC joined
12:13 <remonvv> It shouldn't raise exceptions if it can recover by itself.
12:14 <wtpayne2> Well, as far as I am aware, the AutoReconnect exception exists to let you know (as you stated) that the previous operation might have failed.
12:14 <wtpayne2> So you can then decide whether to retry, or to just press on regardless.
12:14 <remonvv> Yes, so it can't recover by itself.
12:14 <remonvv> Mind you, for w > 0 writes it should be able to recover but hey
12:14 <remonvv> Exactly
12:15 <wtpayne2> Ok. So do you need to reconnect if the AutoReconnect exception is thrown?
12:15 <remonvv> Doubtful. It'll do the reconnecting. The exception is just there to make you aware that whatever you were doing might have failed.
12:15 <wtpayne2> I.e. disconnect() the current Connection and try to create a new Connection()
12:15 <wtpayne2> Ok. That was my understanding.
12:15 <IAD> remonvv: http://www.mongodb.org/display/DOCS/Queries+and+Cursors thay write "If the result set is large, finding the first 100 results may be much faster than finding all results and printing the first 100."
12:16 <remonvv> Not sure. Not a pymongo user. Having to do it manually would be rather stupid though.
12:16 <wtpayne2> Yeah, that's what I thought.
12:16 <wtpayne2> :-)
12:16 <wtpayne2> I think that I can just press on with the next query.
12:16 <wtpayne2> It seems prudent to insert a pause to let (whatever might have caused the previous query to fail) to correct itself.
12:16 <remonvv> IAD, obviously. If you use skip(..) the server will iterate over all results but will not return them. Iterating over all documents on the client-side will force the server to send all documents to the client.
12:17 <remonvv> So if you need the 10000 to the 10010th document you should blindly query it all.
12:17 mramm joined
12:17 <remonvv> But that's not what you asked. You asked if it's more efficient to do single findOne's versus find() + iterator.
12:17 <remonvv> The latter is more efficient.
12:17 <remonvv> wtpayne2, the pause would be completely arbitrary
12:17 <IAD> remonvv: i use many times: $this->collection->find($where)->sort($sort)->limit(1)->getNext();
12:18 <remonvv> It should start using a different connection for all subsequent operations
12:18 <remonvv> right
12:18 <remonvv> so use a cursor instead
12:18 <remonvv> oh
12:18 <remonvv> Wait
12:18 <remonvv> yeah doesn't matter then
12:19 <remonvv> findOne() == find().limit(1)
12:19 <remonvv> .next()
12:19 <IAD> findOne used without sort
12:20 <wtpayne2> Ok. I guess some errors would be caused by network glitches, so a short pause at first would be OK, but then again, the error might be caused by the server going down, so a longer pause (poll every five minutes or so) after a while would be good.
12:24 <remonvv> ? you can't findOne without sort and find with sort and get the same result
12:25 <IAD> yes, i can't findOne with sort. Not find it in man
12:25 alaska joined
12:26 dob_ joined
12:27 <IAD> remonvv: http://groups.google.com/group/mongodb-user/browse_thread/thread/4fb4e270a8da35f1 no way =)
12:31 nathenharvey_ joined
12:33 Error404NotFound joined
12:37 jvalduvieco left
12:37 josue joined
12:38 looopy_ joined
12:39 andreassaebjoern joined
12:43 diogogmt joined
12:43 cybertoast joined
12:44 tjadc joined
12:47 Saranath joined
12:48 aheckmann joined
12:50 billhay joined
12:53 ph^ joined
12:55 mlew joined
12:56 nibblebot joined
12:56 chrisjones joined
13:00 scottbes_ joined
13:03 MacYET left
13:05 msb___ left
13:07 patcito joined
13:08 billhay joined
13:08 scottbessler joined
13:08 dcrosta joined
13:10 Ori joined
13:11 scottbessler joined
13:13 scottbessler joined
13:14 nibblebo_ joined
13:18 thrashr888 joined
13:26 nathenharvey_ joined
13:28 patcito joined
13:28 Electro^ joined
13:28 geoffeg joined
13:28 Ry4an joined
13:28 majackson joined
13:28 jhawk28 joined
13:28 tychoish joined
13:28 _bat joined
13:28 noobie25 joined
13:28 remi joined
13:28 remi joined
13:28 robo joined
13:28 corruptmemory joined
13:28 sirpengi joined
13:28 nathenharvey_ joined
13:28 klj613 joined
13:28 j0su3 joined
13:28 wtpayne2 joined
13:28 tauren joined
13:28 __lucio__ joined
13:28 yfeldblum joined
13:28 SkyRocknRoll joined
13:28 kppullin joined
13:28 Yoms joined
13:28 timoxley joined
13:28 mire joined
13:28 slajax joined
13:28 stbrody joined
13:28 flexd joined
13:28 playcraft joined
13:29 pusewicz_ joined
13:29 tozz joined
13:29 dijonyummy joined
13:31 tommyvyo joined
13:33 nate4096 joined
13:34 psawaya joined
13:35 jsurfer joined
13:39 sunoano joined
13:39 sunoano joined
13:40 idefine joined
13:42 Destos joined
13:44 crudson joined
13:48 diogogmt joined
13:48 thrashr888 joined
13:49 Ori joined
13:49 sdwrage joined
13:52 remonvv joined
13:54 redir joined
13:55 ron__ joined
13:56 Jesmith17 joined
13:58 GabrielVieira joined
13:58 ron__ joined
14:02 tncardoso joined
14:02 wad joined
14:03 ron__ joined
14:05 Vile joined
14:05 Jedi_SCT1 joined
14:07 spicyWith joined
14:15 crodas joined
14:15 JanxSpirit joined
14:18 phlff joined
14:19 Pedro joined
14:20 <phlff> I stupidly just blew away my test DB before asking this question, but I have a dev env and even though there is usually only a few hundred k of data in it, my DB directory quickly grows to about 3.5 GB. Is this normal and is it configurable in the settings?
14:21 <geoffeg_c> phlff: it's probably your database files being pre-allocated
14:22 <geoffeg_c> phlff: http://www.mongodb.org/display/DOCS/Excessive+Disk+Space#ExcessiveDiskSpace-DatafilePreallocation
14:23 methodT joined
14:23 <phlff> geoffeg_c: Well that explains it, I believe. Thanks.
14:25 shakakai joined
14:25 dwhittle joined
14:26 infynyxx joined
14:28 mehlah joined
14:29 <phlff> geoffeg_c: Just tested. rm'ing the data dir then restarting mongo makes the data dir 413MB. On first run of my application which creates the new collections but hasn't actually entered in any data, I see disk usage jump to 3.3GB. So you are right, it is simply preallocation of the data files.
14:29 hasenj joined
14:38 HardFu joined
14:38 <HardFu> hi
14:39 <HardFu> how can I concatenate numbers from a field_
14:39 <HardFu> for example { count: 3 }
14:39 <HardFu> and I'd like to get a total count for all records
14:39 <HardFu> each one would add as much as the count value is
14:41 trbs joined
14:41 vguerra joined
14:46 vadi joined
14:46 <Pedro> is it recommended to shard a collection by its _id? most of the queries are using the _id as a key?
14:46 <vadi> > print ( ISODate("2010-07-30T15:05:00Z") );
14:46 <vadi> Fri Jul 30 2010 16:05:00 GMT+0100 (GMT)
14:47 <vadi> How to get the actual "2010-07-30T15:05:00Z" value?
14:47 tomo__ joined
14:59 meghan joined
14:59 dwhittle joined
15:00 daelious left
15:02 <asciiduck> Is there a way to record all the queries a MongoDB server receives soI can replay them? DiagLogging seems to only record some of the reads.
15:02 mbj joined
15:07 ron joined
15:14 remonvv joined
15:16 curt__ joined
15:20 <vadi> How to covert ISODate("2010-07-30T15:05:00Z")
15:21 <vadi> to ISO8601 format?
15:21 ron joined
15:23 crudson joined
15:25 <mattbillenstein> http://www.mongodb.org/display/DOCS/Dates
15:25 patcito joined
15:26 <skot> asciiduck: No, not really. You could put a proxy in front to record them.
15:26 <skot> You can turn on database profiling to collect all operations, and just filter out the queries.
15:26 <skot> But there are limitations of the size of queries recorded there.
15:27 alaska joined
15:29 <vadi> thanks mattbillenstein . Let me look
15:30 marvin_ joined
15:36 xaep joined
15:38 sdwrage joined
15:40 kevwil joined
15:41 nibblebot joined
15:41 devdazed joined
15:42 kevwil left
15:44 marthinal joined
15:45 webclimber joined
15:51 kpshek joined
15:51 <asciiduck> When I enable profiling on a database in a replica set, does taht store profiling data
15:51 <asciiduck> Does that store profiling data for the whole replica set in the collection?
15:52 <skot> no, just the local server instance.
15:57 <vadi> Solved, thanks mattbillenstein
15:57 <asciiduck> Okay, thanks.
16:02 tommyvyo joined
16:07 thelinuxkid joined
16:10 billhay joined
16:10 <mattbillenstein> vadi: np
16:16 vadi left
16:25 Ori joined
16:25 sr71-blackbird joined
16:26 Pedro left
16:29 doubletap joined
16:30 doubletap left
16:35 moshef joined
16:36 <moshef> guys, its not possible to search within a nested documents with or, right?
16:36 <moshef> i remember asking about it few weeks ago and i was directed to a feature in development page regarding this
16:41 jsurfer joined
16:42 diogogmt joined
16:42 maushu joined
16:49 nate4096 left
17:01 nibblebot joined
17:02 napperjabber_ joined
17:08 napperjabber joined
17:12 Jesmith17 joined
17:12 Vile joined
17:14 albertosh joined
17:15 ezmobius joined
17:16 mehlah joined
17:23 mramm joined
17:25 blueadept joined
17:25 blueadept joined
17:28 mire joined
17:29 <skot> moshef: do you have an example? you can use $or with dot-notation no problem.
17:32 JanxSpirit joined
17:34 corruptmemory joined
17:36 wallerdev joined
17:39 bsegal joined
17:39 mehlah joined
17:43 sasori joined
17:43 <bsegal> jwage: you around to take a look at a doctrine question on SO?
17:43 <jwage> i can try
17:45 joshsmith joined
17:45 <bsegal> http://stackoverflow.com/questions/9030901/doctrine-odm-set-random-value-generated-by-js-math-random-on-pre-persist
17:45 <bsegal> thanks
17:46 <jwage> unfortunately i dont think this is possible right now
17:46 <bsegal> this isn't my question, but i can relay that to them if you want
17:47 h0bbit joined
17:47 <jwage> it depends on what type of field random is mapped as actually
17:48 dudewheresmycode joined
17:49 dkliban joined
17:49 <dudewheresmycode> is there a way to do a SUM of a field in a query.. e.g. db.col.find({id:1},{$sum:{count:1}}) or something?
17:49 <bsegal> jwage: i see. thanks for having a look.
17:50 <skot> dudewheresmycode: you can use group or map/reduce or the new aggregation framework (in the current dev nightly)
17:51 <dudewheresmycode> but will that give me the current sum? or just the last nightly map reduce when i query it?
17:52 <dudewheresmycode> can i simply run the map reduce right before (or along with) each query?
17:54 <skot> A better thing is to keep a counter with the sum so it is a constant time operation.
17:54 <skot> Then anytime you add/remove from a count, you can keep the sum up to date.
17:54 ph^ joined
17:55 Pinako joined
18:06 <dudewheresmycode> some more specifics on the project.. their for analytics.. so there's a count (or sum) field per record kept by hour.. so 1am = 50, 2am = 59, 3am = 34
18:07 <dudewheresmycode> i need to query and ask for the sum of a certain time period, say the last 24 hours.. so i query the time fields and it returns me 3 records with the {count} fields and i have to loop thru the results to sum up the total time period
18:07 <nick_h_> with docs like this: {name: "Bob", things: [ {name: "team", value: "vikings"}, {name: "colour", value: "red"} ] } is there a way to sort the docs on the "value" field where name is "team"?
18:07 johnanderson joined
18:09 <dudewheresmycode> db.collection.find( { "name": "team" } ).sort( { "value": 1 } )
18:09 <dudewheresmycode> http://www.mongodb.org/display/DOCS/Sorting+and+Natural+Order
18:09 dkliban joined
18:09 <dudewheresmycode> ^^^^ — RE: nick_h_
18:10 <nick_h> dudewheresmycode: that'll sort on the "name" field in the root doc. i'm trying to sort on the "name" field in the documents in the "things" field. ie: things.name
18:10 <nick_h> oops, let me rephrase that
18:11 dob joined
18:11 <nick_h> i'm trying to sort on "things.value", but only where "things.name" is "team"
18:11 <dudewheresmycode> you might try using the $in operator
18:13 JaredMiller joined
18:13 <nick_h> dudewheresmycode: i'm not sure how $in would help. that's for restricting which documents are matched, rather than for sorting
18:14 h0bbit joined
18:15 <dudewheresmycode> and you can't just do .sort({things:{name: 1}}) ?
18:17 <dudewheresmycode> db.collection.find( {"things": { "value": "vikings" } } ).sort( { "things": { "name": 1 } } )
18:17 <dudewheresmycode> not tested.. but why wouldnt that work?
18:20 <nick_h> dudewheresmycode: "things" is an array. it's not possible to sort on an array. i'm trying to sort by a field in one specific doc within the "things" array
18:21 <dudewheresmycode> map reduce?
18:21 <nick_h> that might work
18:21 <Ry4an> the new aggregations stuff would do that, but it's only in development builds now
18:22 <dudewheresmycode> or just do it client side for now.. unless you're dealing with tons of data
18:22 <dudewheresmycode> return what you can and create a custom script for sorting in your app
18:22 <dudewheresmycode> what language are you working in? or you doing this via mongo shell?
18:23 DofLeFou joined
18:24 nitin joined
18:25 <nick_h> i'm doing this in Ruby using Mongoid. however, there's too much data to retrieve it all and sort client-side
18:25 rick446 left
18:27 h0bbit joined
18:30 h0bbit joined
18:32 <tornd> hm, anyone that can shed some light on this?
18:32 <tornd> https://gist.github.com/1691573
18:32 <tornd> querying on one field and sorting on two fields, all 3 fields indexed, yet it performs a scan of sorts
18:32 <tornd> not a full scan, but still
18:33 <tornd> reading the index docs here I should never see nscanned larger than 0, and indexOnly should be true, if a query only hit the index
18:33 xeodox joined
18:34 jdawgaz joined
18:36 <tornd> or would it be better design to just index the instance_id field here and not index the fields I'm sorting on? the amount of users per instance_id won't grow especially large, the docs mentions it being doable on result sets less than 4MB
18:39 thomasdebenning joined
18:40 <tornd> hm, maybe I'm just misreading the explain() docs here
18:50 h0bbit joined
18:50 nibblebot joined
18:51 davidwalsh joined
18:52 dob joined
18:52 <skot> looks good, nscanned == n which is what you return.
18:53 <skot> indexOnly refers to if the query doesn't need to return data from the documents, like the data is in the indexes.
18:54 billhay joined
18:55 cybertoast joined
18:55 <tornd> skot: yeah, figured - just misread the explain docs
18:56 <tornd> should I assume I'm in the clear as long as it chooses a BtreeCursor cursor and nscanned == n ?
18:56 looopy joined
18:58 <skot> yes
18:58 <skot> That is the best you can do.
19:02 <tornd> allright, makes more sense then
19:02 <tornd> did the massive trick of coding for 3 days straight not caring about indexes since I hadn't read up properly on it yet, thinking I'd go through the model code and add them later
19:02 <tornd> painful ;)
19:02 SwearWord joined
19:02 <tornd> note fo self and so on
19:04 yfeldblum joined
19:10 tkrajcar joined
19:12 S2kx joined
19:14 jonwage_ joined
19:17 h0bbit joined
19:19 ixixi joined
19:22 ezmobius joined
19:34 h0bbit joined
19:36 jacobwg joined
19:46 billhay joined
19:48 LuchoVtn3d joined
19:50 h0bbit joined
19:58 thelinuxkid joined
20:06 h0bbit joined
20:08 fr0zen joined
20:08 thalll joined
20:10 neurodrone joined
20:13 h0bbit joined
20:23 h0bbit joined
20:32 nitin joined
20:37 rick446 joined
20:39 dkliban joined
20:47 skot joined
20:54 GabrielVieira joined
20:56 roflcerofthelawl joined
20:59 dkliban joined
20:59 SwearWord joined
21:02 mire joined
21:04 dkliban_ joined
21:16 rick446 joined
21:16 hasenj joined
21:21 Pagebakers joined
21:28 erkules joined
21:31 infynyxx joined
21:46 avalanche123 joined
21:48 apwalk joined
21:50 mindlogger joined
21:57 ron_frown joined
22:01 sdwrage joined
22:03 jsurfer joined
22:09 dudewheresmycode left
22:12 mindlogg1r joined
22:18 mindlogger joined
22:28 wtpayne joined
22:32 veg^ joined
22:33 neurodrone joined
22:33 nibblebot joined
22:36 ircdearia joined
22:38 h0bbit joined
22:41 vsmatck joined
22:50 <veg^> is there way to pass $ like escaped symbol or smth, that it will be treated as normal $....
22:56 <alnewkirk> veg^: thats gonna be a BIG why?
22:56 <* alnewkirk> suspects veg^ is asking for trouble
22:58 <veg^> i need to check operators, that pass to engine, i check it for q[0] == '$'
22:59 <alnewkirk> veg^: that statement is ambiguous
23:01 <veg^> so any hints?
23:01 johnanderson joined
23:03 apwalk joined
23:03 <alnewkirk> veg^: can you show me an example of what you're trying to insert?
23:04 <veg^> i'm checking for operators in white list, i saw here http://www.mongodb.org/display/DOCS/Do+I+Have+to+Worry+About+SQL+Injection that i can use utf8 for $, right
23:04 h0bbit joined
23:05 <veg^> now i just checking for symbol '$', is it enough
23:06 <veg^> i'm using php if it makes sense
23:07 <alnewkirk> simply put, just dont
23:11 apwalk_ joined
23:14 apwalk_ joined
23:15 h0bbit joined
23:17 h0bbit joined
23:20 avalanche123 joined
23:22 apwalk_ joined
23:30 Goopyo joined
23:31 IAD joined
23:31 <Goopyo> Anyone know read through a java result?
23:32 <Goopyo> not sure how to move through/process the data returned
23:33 <veg^> why "\uFF04" doesn't work for "$", works only "
23:34 <veg^> "\u0024"
23:39 <veg^> but here is mentioned \uFF04 http://www.mongodb.org/display/DOCS/Do+I+Have+to+Worry+About+SQL+Injection
23:39 <veg^> i checked in the sheel
23:39 <veg^> *shell
23:40 jsurfer joined
23:42 cybertoast joined
23:48 webclimber joined
23:50 billhay joined
23:51 spicyWith joined
23:56 <veg^> also why should i worry about '.' in keys, what is it doing?
23:59 <alnewkirk> wtf veg^