[01:03:12] <svm_invictvs> Datastore.save doesn't actually modify the objcct you pass in does it?
[01:10:24] <brotatochip> hey Boomtime, I wonder if you can explain why my secondary replica set member only has 6gb of journals whereas the primary has 10
[01:13:27] <Boomtime> ok, that's a bit more interesting, though there are a few ways that can happen too
[01:13:37] <Boomtime> has the secondary been resync'ed ever?
[01:13:39] <brotatochip> Also, it does seem that the indexing is not happening in the background, but when there is a change in the size on the primary, i'm seeing a similar change on the secondary, although the primary is still just under 10gb and the secondary is 6
[01:13:52] <brotatochip> This is after an initial sync
[01:14:00] <brotatochip> Completed under 10 minutes ago
[06:29:50] <svm_invictvs> It seems to be ignoring the limit on the query.
[06:40:26] <nawi> is index { name: 1, address: 1 } used for a query { name: "foo" }? more specifically, I want to make queries with 2 to 6 properties, do I need to make index for each combination of properties used?
[06:47:46] <Boomtime> @nawi: to your first question; yes. to you second question; no
[06:49:04] <Boomtime> note that if you index { name: 1, address: 1 } then search for { address: "N blah street" } may not use that index because it requires the full scan of the first field which isn't very efficient
[06:49:52] <nawi> to be more specific, my queries are like { time: 1234, "foo.bar": true, "foo.bar2": true } or { time: 1234, "foo.bar3": true } and so on
[06:50:02] <Boomtime> but a search for { name: "foo", state: "sunnyville" } would likely use that index
[06:50:33] <nawi> so I guess I can just make an index { time: 1, "foo.bar": 1, "foo.bar2": 1, "foo.bar3": 1 } and the index should be utilized for all the queries?
[06:51:06] <Boomtime> in the examples given, yes, but with varying levels of efficiency
[06:52:04] <Boomtime> any query containing 'time' field would use the index - any query without that field is unlikely to ise that index because it occurs first, and is thus not likely to be useful
[06:52:27] <nawi> the time is always used here, but the "foo.bar" properties depends on the search
[08:28:23] <vagelis> Can we use $set and and $unset for the same <field> at the same time? Well it returns that it cant do that but actually I would like to know if this was the behavior before or it was from the start like this.
[08:29:11] <vagelis> I found a python test that has: {'$set': {'a': 3}, {'$unset': {'a': 4}}
[08:29:23] <vagelis> And it expects a to be 3 after the test
[12:27:21] <StephenLynx> mongo doesn't have its own language.
[12:27:35] <StephenLynx> drivers use the language of the runtime environment.
[12:27:37] <cheeser> not in the same way at least.
[12:28:01] <StephenLynx> it becomes much more intuitive when you get used to it.
[12:28:19] <StephenLynx> because you are not writing code and hope its right, you right actual commands.
[12:28:20] <cheeser> ultimately, mongo queries are (extended) json and each language/driver has different approaches to building those json documents.
[12:28:27] <symbol> Ah ok, that's really interesting! So it doesn't matter than the shell is a JS interpretter since the driver doesn't go through the shell?
[13:47:20] <ArTiSTiX> Hi there ! I'm searching for some advice about custom aggregations... Is it a good idea (or possible) to make a $sort for each query by an aggregated field which is a linear function between $geoNear distance and time (like a score) ?
[13:48:22] <ArTiSTiX> (e.g. i search documents near a point, but i want to sort it by descending [X*distance + Y*timeDifference] )
[13:49:04] <ArTiSTiX> I need to explain my client it's a very bad idea...
[14:11:18] <koren> Does secondaries un a replica set replicate from the primary's oplog only? I want that only 1 secondary read primary oplog and then others secondaries read from secondaries oplog
[14:11:43] <cheeser> you can tell a secondary to sync from a different member, sure.
[14:27:28] <deathanchor> off-topic general question: workstation setup, facing toward or away from window?
[14:29:46] <jacksnipe> toward but there's a curtain for bad sun angles
[14:43:49] <deathanchor> I face away (so monitor glare is a problem), but if I turn around then my back is to a walking area that everyone passes by :(
[14:53:42] <chowes> Is there a way to sort by the # of matches found by the $in array operator? (http://docs.mongodb.org/manual/reference/operator/query/in/#use-the-in-operator-to-match-values-in-an-array)
[14:54:11] <chowes> something like $score for $text?
[14:59:10] <koren> chowes: would use aggregation framework, $group then $sort
[15:10:16] <Hanumaan> getting following error from the server "unauthorized db:tapari lock type:-1 client:156.211.156.175
[15:59:08] <hundredideas> I'm creating a simple ontology to represent semantic relations b/w a set of ~50 terms. Straightforward to serialize as json-ld or in xml/owl and I could probably write or find a little js DAG data structure to facilitate accessing the relations in the ontology... But should I just use mongo? Not sure if it's a terrible idea. The mongo docs explain how to set up a very simple tree structure (http://docs.mongodb.org/manual/tutorial/m
[16:01:24] <GothAlice> MongoDB has no concept of joins or recursive queries server-side, so depending on your queries (find nodes two relations away, for example) may be either painful to work with, or impossible.
[16:05:45] <hundredideas> I am completely inexperienced w/ how ontologies expressed as rdf/xml or owl or json-ld are actually parsed. I guess they might not be stored in a db at all by many clients, just read into memory
[17:02:36] <deathanchor> hmmmm .sort({ time : -1}).limit(1) doesn't show me the last document by time.
[17:41:27] <foldedcat> I have a collection with a field that is an array of _id's from another collection. What's the best way to fill out that array with the data of each item in that array of _ids
[19:08:12] <greyTEO> GothAlice, have you ever had to exclude a field from the mongo-connector?
[19:08:24] <GothAlice> I technically don't use mongo-connector.
[19:08:40] <GothAlice> I rolled my own mongo-connector-alike prior to the development of mongo-connector, for my needs.
[19:08:42] <greyTEO> oh ok. My bad I thought you did
[19:09:25] <greyTEO> doesnt look like there is a way to do it yet.
[19:09:25] <GothAlice> It seems I frequently ran into needed features, and would add them myself, prior to them being added by the 10gen folks. Compression is another example, also full text indexing. ;)
[19:10:22] <greyTEO> do you manually create your indexes in ES?
[19:13:05] <GothAlice> And yeah, the Neo4j and MongoDB sides are basically completely separate, schema-wise.
[19:13:36] <greyTEO> Neo4j has always interested me but I can't find a good time to use it
[19:17:26] <greyTEO> looks like in ES I can just set the field to be ignored. https://www.elastic.co/guide/en/elasticsearch/guide/current/dynamic-mapping.html
[19:17:54] <greyTEO> But I would like to stop it more upstream
[19:58:04] <owen1> why is this insert fail? db.events.insert({ non : false, sfUserId: '54d41351db0349cf4b000008', times : { tz : "-07:00", end : ISODate("2015-06-12T14:00:00Z"), start : ISODate("2015-06-12T10:00:00Z") }, eventName : "Sangre app" });
[19:58:16] <owen1> (it's working on my local mongo, but not on my production server)
[19:59:58] <cheeser> what does the error message say?
[20:02:08] <owen1> cheeser: how to print the error message?
[20:21:17] <owen1> it just not adding to that collection.
[20:21:28] <owen1> btw, it works also on my test db on production box
[20:45:00] <shlant> hi all. If I need to create a user for a node.js app to connect to my database, and do the usual create/delete/modify data, what kind of role should it have?
[22:50:11] <diegoaguilar> Hello, anyone experienced with mongolab here?
[23:18:16] <rsully> how can I install mongo on ubuntu without it auto-starting and creating prealloc files? they fill up my hdd, I need to symlink the folder before it starts. I tried the runlevel=1 hack but it does not work for mongo
[23:18:33] <joannac> why don't you symlink the folder first?
[23:18:52] <rsully> because the folder doesn't exist until its installed
[23:19:05] <rsully> and mongodb user is not created
[23:19:57] <rsully> would symlinking /var/lib/mongodb to another drive work if that is owned by root? would the installer change the owner when it creates mongodb user?