[01:17:14] <Almindor> our replica set restore is taking too much time and resources, is it possible to just copy files from the master (the whole directory contents) when mongod is turned off and sync this way or would the metadata prevent this from working? (I noticed this method is mentioned on the web)
[01:17:28] <Almindor> I wasn't sure what "all node data" means if all files in the node dir, or just some
[02:51:00] <Almindor> can someone confirm if copying all node data (that is all contents of the node's data dir) to a replica node is the same as doing a full resync? (when mongod is off of course)
[04:51:43] <adiabatic> I have a document that looks like {'quests': {'kill_ten_rats': {'status': 'unstarted', 'progress_max': 10}}}. How can I change the status of the kill-ten-rats quest to 'started' without accidentally erasing the progress_max key/value pair?
[04:58:03] <crudson> adiabatic: update with something like {$set:{'quests.kill_ten_rats.status':'completed'}}
[04:59:14] <adiabatic> ok, so “status” needs to be after a ., not in a subdict (I'm using Python)
[05:00:08] <crudson> adiabatic: the key points are 1) using $set so the rest of the document is unaffected 2) using dot notation to reference and embedded attribute
[08:58:15] <NodeX> and they work by assigning an identifier - i/e a session id or something
[08:59:45] <Bartzy> so the connection is saved on the mongodb server - and then the clients only need to open a TCP socket and ask for a connection ?
[09:00:04] <Bartzy> NodeX: Can you provide a link to the docs? I didn't find anything that explains how it works there.
[09:01:16] <NodeX> pass, I really don't care for the internals as they don't effect my apps ergo I don't know where the docs are on how mongodb handles memory with connections
[09:02:35] <Bartzy> NodeX: But where the connection is stored? :\
[12:26:57] <cenuij> zakg: if there's something missing, patch the package yourself via your open build service account and submitrequest it back to the development project ;)
[12:40:19] <algernon> ppc is BE, mongodb - as far as I remember - runs only on LE architectures.
[13:36:15] <Datapata> Hiya. I have massive problems with my replica set. I have one node on AWS and two in the office, one of the machines in the office is trying to sync and the other machine in the office keeps dying. Since sync uses the closest machine to sync it uses the dying machine.
[13:37:09] <Datapata> I have a mongodump from yesterday witch I took with --oplog, can I use that on the node that needs to be resynced and then let it joing the replica-set?
[13:37:34] <Datapata> This mongodump was taken on the machine on AWS.
[13:57:56] <stefancrs> when implementing a "full text search" in mongodb I usually split any stored text up into its separate words and store those as search keywords. but if one also want to be able to search with quotation marks, like "word1 word2" and only get hits with word2 following word1 in the stored text, how would one go about doing that?
[13:58:10] <stefancrs> for any given "quoted sentence" that is :)
[13:59:30] <ron> by using an external index engine and not using mongodb for FTS.
[13:59:49] <kali> you can store both the split words and the actual text. on a query, you filter the result given by the words by looking for the right sequence on the text
[14:00:26] <kali> but... if you want something serious, external engine is the way to go
[14:16:22] <NodeX> they all index ... with regex using a prefix it will use the index, else it wont
[14:17:10] <stefancrs> NodeX: yeah, which is why "always use a prefix" caught me off guard, since it was after I said "no regex will eb used, or maybe just ^keywrd" :)
[14:18:03] <akaIDIOT> the docs has a nice page on sharding limits
[14:18:30] <akaIDIOT> query speed aside, is there a practical limit to the amount of sharded data ?
[14:19:07] <akaIDIOT> i remember one of the 10gen guys mentioning something about the mongos process needing all keys in memory, creating a limit on the total size of things
[14:19:27] <akaIDIOT> so was wondering if that goes per db or per collection or per cluster
[14:22:22] <akaIDIOT> last two comments on the wiki page indicate the limit is per collection, though does not point to any resource stating why and the like
[14:32:30] <paultag> Hey mongo'ers. I'm interested to know if I can search by finding a subset of a given array. Let's say I have a "capabilities" array for nodes, and in a document, it has a "needed_capabilities" (I'm just making this up as I go on, work with me here) -- is there any way to search for all documents who's required_capabilities are a subset of capabilities (array) ?
[14:32:56] <paultag> $in is wrong for this, as it $and
[14:33:02] <paultag> I'm wonding if I'm missing something
[14:35:20] <NodeX> can you explain it differently?
[14:35:57] <paultag> It's a tough thing to explain. Let's see here.
[14:37:24] <paultag> If I had a build-farm and I wanted to test based on constraints - let's say my builders have a capabilities array -- [ 'gcc', 'debian', 'sid' ] -- and a build job -- needed_capabilities: [ 'gcc' ] & another with [ 'clang'] -- how can (given the first array, of the builder) I query for all jobs that have a subset of my array (e.g. return gcc, but not clang)
[14:40:07] <paultag> I'd just like to make sure [ 'joe', 'bob' ] matches ['joe'], ['bob'], ['joe', 'bob'], ['bob', 'joe'], but not ['joe', 'jose'] or ['billy', 'rex']
[15:02:58] <NodeX> thank firefox history for that one!
[15:04:03] <NodeX> looks like that's exactly what you want
[15:05:03] <paultag> NodeX: thanks! Let me take a look here :)
[15:05:36] <NodeX> basicaly you query with the array you want
[15:06:43] <paultag> Ah, yeah, I see. I'd like to have defined users: [ '2' ] & gotten back all things with users: '2' in it, as with [ '2', '3' ] getting back all with both 2 and 3 in there
[15:06:52] <paultag> NodeX: it's very close, but slightly off :(
[15:07:12] <paultag> I'd like to have defined users: [ '2' ] & gotten back all things with users: '2' in it, as with [ '2', '3' ] getting back all with both 2 and 3 in there
[15:26:50] <Almindor> could someone please confirm if it's possible to restore a replica node by deleting all it's data and then copying all the data from working master node (including journal etc. all in the folder)?
[15:27:11] <Almindor> I tried a full resync by deleting the node but it's taking ages and I think it actually stalled out of memory o.O
[15:30:21] <kali> Almindor: http://www.mongodb.org/display/DOCS/Resyncing+a+Very+Stale+Replica+Set+Member, last chapter, second option
[15:42:58] <kali> i'm not sure it is a very good idea to have swap on a server with mongodb
[15:43:29] <Almindor> I think there's no point in letting it hang the server now tho it had the whole night and didn't move anywhere
[15:43:50] <jgornick> Hey guys, I'm trying to use map/reduce to produce a count of documents that will be uncategorized if I remove a category and all it's child categories. I have a sample dataset of my category collection found https://gist.github.com/c1dc2da8fdfb89a9ee69 Any help would be greatly appreciated!
[15:59:25] <niram> hi, i have a question about MongoGridFS::storeBytes in php driver (http://php.net/manual/en/mongogridfs.storebytes.php)
[16:00:23] <niram> what exactly does the "safe" option do? Does it ensure it was writen to the journal (as it should) or does it do fsync (which would sucks)
[16:34:03] <Almindor> just for others info it works if you copy everything from one replset node to another to resync
[16:34:16] <Almindor> and it's much much much faster and less intensive than normal resync
[17:49:21] <EricL> Any chance Tad Marshall is here?
[17:52:32] <drummerp> Hi, I'm having trouble using the Java connector for MongoDB. I'm using a function which retrieves a single document by the field objectId, as you can see here: http://pastebin.com/vM3BBLwn I have already connected to the database and initialised the `collection` variable. The issue is that when I call cursor.count(), I get an IllegalArgumentException at runtime with the message "'ok' should never be null..."
[18:06:24] <drummerp> I apologize, would it be better for you if I provided an SSCCE instead of just a code sample from a single function?
[18:06:29] <alexyz> anyone has a pointer/link to an explanation of why *mongos* role isn't part of a normal mongo server (why does it need to be a separated process)?
[18:14:52] <Vile1> Hi, does the sharding and replicaset lives together? I want to get something like http://vile.su/pics/is-it-20120802-191338.png that, but not sure if that is how it actually works
[18:18:40] <Vile1> I want to place servers into different DC's
[18:19:38] <jY> have you read this http://www.mongodb.org/display/DOCS/Data+Center+Awareness
[18:20:35] <jY> i don't think there is anyway to compress the data per say between datacenters
[18:21:30] <drummerp> This is very strange. I just created an SSCCE from my project, and the exception went away, and it properly retrieved the document and printed it accurately.
[18:21:44] <drummerp> I suppose it must be something to do with the way I'm integrating it with Spring.
[18:27:06] <Vile1> jY: do you know if mongo compresses the transferred data? If not, then I can probably introduce compression on VPN between DCs
[18:38:13] <thedahv> Howdy. I have a question about a good strategy to search on "full name" fields on a document if I'm currently storing "first_name" and "last_name" separately
[18:38:45] <thedahv> I'm using mongodb through the mongoose library. It's easy enough to define a virtual field so my application-level stuff can get the full_name without much fuss
[18:39:09] <thedahv> But fuzzy searching through documents by a full name search query is tough
[18:39:17] <thedahv> Should I just persist a full_name field?
[18:39:53] <drummerp> I believe I may have found the issue. I believe it to be a scope issue relating to Spring MVC which I have overlooked.
[18:40:32] <aheckmann> thedahv: you could, or add keywords to your docs and search those
[18:41:02] <thedahv> aheckmann: like a list of possible search terms?
[18:42:57] <thedahv> But at the user-level, they don't care about that. They just want to start typing and get the result they want
[18:43:24] <thedahv> Oooh, but I'm reading this library now
[18:43:35] <aheckmann> thedahv: so that module lets you specify which document fields to keywordize, e.g. auto-add to the keywords array when saving etc
[18:48:27] <thedahv> So if my query is something like "George Washington" and keywords is ['first_name', 'last_name'], it will match?
[18:48:41] <thedahv> Well, I guess I can just give it a shot and see :)
[18:49:22] <aheckmann> thedahv: yeah playing around with it quick (take a peek at the tests) will show you more quickly than i can type
[18:50:14] <thedahv> Cool. Thanks for the pointers. I'll report back when I get something working
[19:23:33] <houms> i have installed mongo on 3 servers and one of them i cannot access the web interface. even though lsof shows the port is listening. it seems it is listening on localhost instead of the LAN ip
[19:25:01] <slava_> so tell mongod to listen on all interfaces
[19:28:25] <houms> slava what i am not clear on is the servers were setup the exact same way using the same mongod conf file which does not define bind_ip. just not sure why this one server is doing that. thought i missed a step somewhere
[20:34:36] <thedahv> aheckmann: I got a decent working solution for implementing typeahead searching on a 'full name' field
[20:35:04] <thedahv> Using the custom function on that keywordize library, I was able to get the union of the character arrays from the first_name and last_name fields
[20:49:35] <wingy> is there a way to get documents with linked documents in one query?
[20:59:16] <jn> hi, is there a way to get better formatting from the mongo shell? this isn't working for me http://xn--bl-wia.se/bd23f5ed98.png
[20:59:52] <grallan> wingy: I don't think there is from the command line. If you use an ORM, there might be one built for you. Like in mongoose for node.