PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 29th of July, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[06:22:53] <hemangpatel> Hello there
[06:23:07] <hemangpatel> mongo-connector only works with replicaset ?
[09:46:04] <thapakazi> hi there, I wonder how do we load the index into memory ? how to check if index is loaded into memory or not ?
[10:14:18] <Derick> thapakazi: it's not something you can influence (or check)
[10:17:59] <thapakazi> Derick: How do I do warmup then ? I can't use touch command :( https://docs.mongodb.com/manual/reference/command/touch/ I am trying mongorocks, and there is nothing about it on wiki page :(
[10:18:38] <Derick> mongorocks does things totally different than our engines, so can't help you there at all
[10:35:56] <hemangpatel> Can we use query in mongo-connector ? I move document to elasticsearch so i can index. But i want to do it for particular documents.
[10:59:39] <thapakazi> where can I reach out for mongorocks ? any one rocks db user inhouse ?
[11:53:30] <neoromantique> in mongo shell(.find())
[11:53:41] <neoromantique> how do I query all where data type is object?
[11:53:58] <neoromantique> e.g I have 50 documents with 1 field in them being either object or string
[11:54:01] <neoromantique> I want to query all strigns
[12:30:14] <hmahmod> I've got a cursor running on a connection and I want to log in with a different connection and view all running connections, including the previous connection. I've had a look at currentOp() and serverStatus() but no luck.
[16:18:55] <docmur> I'm connecting to my MongoDB from C, I queries printing out ex: { "_id" : { "$oid" : "579b6fbf9f9a9ac70c2414df" }, "key" : "ec", "command" : "cat file.txt" } code: http://pastie.org/10923167 my question is, is there a way using prebuilt functions to parse the output and get the value for command?
[16:29:38] <StephenLynx> > I queries printing
[16:29:42] <StephenLynx> what do you mean by that?
[16:30:11] <docmur> *I have my queries printing out to the screen
[16:30:20] <StephenLynx> ah
[16:31:04] <docmur> I could write a parser but would rather use a prebuilt one if it exists
[16:32:15] <StephenLynx> are you talking about the part that you printf the document as json?
[16:33:42] <docmur> Yes, instead of doing the printf, that was there to show it was working, I want to seperate the command to run
[16:35:05] <StephenLynx> so you want to print the command before being executed?
[16:37:55] <docmur> no, I just want to parse the output and get the command to execute :). I assume the driver has some ability to extract a value based on it's key
[16:38:50] <StephenLynx> what command?
[16:38:55] <StephenLynx> you got a document.
[16:39:17] <StephenLynx> you want the document as a dictionary?
[16:41:39] <docmur> "command" : "cat file.txt" I want to parse str and get cat file.txt becuase it's the command I'm looking for, hence why the key is command
[16:42:37] <StephenLynx> ok
[16:42:44] <StephenLynx> first you need a library that parses json.
[16:42:53] <StephenLynx> I don't think mongo driver provides that.
[16:43:00] <docmur> Ahhh okay :)
[16:43:02] <docmur> that's what I was asking
[16:43:06] <docmur> guess I went about it porrly
[16:43:08] <docmur> *poorly
[16:43:16] <StephenLynx> but again
[16:43:23] <StephenLynx> I never used the C driver.
[16:43:31] <StephenLynx> so I might be wrong.
[16:43:40] <StephenLynx> but I'd still think that's outside the driver's scope.
[16:43:42] <docmur> Well thanks for your help anyway
[16:52:11] <basil_kurian_> I 'm trying to upgrade a replica set nodes from 3.0.12 to 3.2.8 . After package upgrade on one node , when I try rs.status() , I 'm seeing this message
[16:52:12] <basil_kurian_> "infoMessage" : "could not find member to sync from"
[16:52:18] <basil_kurian_> Any clues ?
[16:52:34] <basil_kurian_> if I rollback to previous version , then there are no issues
[18:10:35] <alexi5> hi everyone
[18:22:28] <StephenLynx> kek
[18:28:24] <alexi5> :)
[18:28:50] <alexi5> so far I have built one successful application mongodb that is currentlty being used at work
[18:29:16] <alexi5> really impressed of the the way documents map to the object model
[18:34:13] <alexi5> if I have documents in a collection like { "createDate":ISODate("2016-07-19T15:44:47.961Z") , "name":"alex" } . how do i query for all documents where CreateDate is greater 10 minutes ago ?
[18:34:45] <StephenLynx> first, create a date object on your application code.
[18:34:54] <StephenLynx> second, set its date for 10 minutes ago
[18:35:06] <StephenLynx> then query all documents where create date are greater than this date.
[18:35:17] <StephenLynx> there, all documents from the last 10 minutes
[18:35:28] <alexi5> thanks
[18:35:33] <alexi5> that simple eh
[18:35:38] <StephenLynx> aye
[18:35:51] <StephenLynx> since you used proper dates, the driver will handle the conversion.
[19:13:03] <amritoit> hi
[19:13:12] <amritoit> cls
[19:13:31] <amritoit> Hi.. does reference in morphia will be inserted along with parent
[19:13:31] <amritoit> doucment. Please need a reference
[19:13:43] <amritoit> Hi.. does reference in morphia will be inserted along with parent doucment. Please need a reference
[19:16:26] <cheeser> no. referenced entities have to be persisted first or have a manually set ID
[19:18:19] <amritoit> thanks. and is there any way to make the reference load on demand . I dont parent to be overloaded on get until and unless I dont need the child objects?
[19:19:51] <cheeser> @Reference(lazy = true)
[19:21:15] <amritoit> Thanks @cheeser. Trying,hope this will make my work
[19:23:58] <amritoit> one more help I need @cheser while referencing to a object , we need an Id for the assosiation. Can I make that id composite(Lets assume it as a seperate object.)
[19:27:34] <cheeser> you can, yes.
[19:28:04] <amritoit> ok. No need any special care for this?
[19:31:50] <cheeser> nope. it should Just Work.
[19:36:52] <amritoit> ok.
[20:36:15] <ssarah> Hei guys, whats the easy way to update fields only if the value is different from empty ?