PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 22nd of January, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:00:26] <justen_> The original document has multiple fields. Some of those fields store _ids to other documents. I pull this document data to the client side (so I can present it in the html templates) using mongo's populate().
[00:00:44] <tystr_> is there a generic download for MMS somewhere?
[00:00:49] <justen_> Now over on the client side of my website, I make changes to the document containing populated fields.
[00:01:29] <justen_> when I go to save those changes, I get an error because of the populated fields. So I comb through the populated fields and changes them from objects to just their _id representation
[00:01:46] <justen_> Any better?
[00:01:49] <Joeskyyy> tystr_: Not that I know of, there's user specific info in the package you download from the site.
[00:02:10] <tystr_> Joeskyyy yeah, was looking at building a puppet module to automate deploying the agent
[00:02:17] <tystr_> would like to just plug in the license and go
[00:02:40] <Joeskyyy> Would prolly have to reach out to the mongo folks for that.
[00:05:20] <tystr_> oh found it
[00:05:25] <tystr_> https://mms.mongodb.com/settings/mms-monitoring-agent.tar.gz
[00:05:29] <Joeskyyy> Nice!
[00:05:30] <Joeskyyy> :D
[00:07:31] <Joeskyyy> justen_: Are you using the mongoose drivers?
[00:07:38] <justen_> ya
[00:08:14] <justen_> Tried them first, but they are quiet over there though
[00:09:09] <Joeskyyy> Gotcha. That at least gets a clearer picturer where you're at.
[00:09:18] <Joeskyyy> I'm no good when it comes to node.js or mongoose stuff
[00:10:10] <Joeskyyy> Reading the docs super quick, i found this
[00:10:10] <Joeskyyy> http://mongoosejs.com/docs/populate.html
[00:10:15] <Joeskyyy> In case it's any help at all?
[00:10:46] <Joeskyyy> There's parts in there about updating refs and saving refs
[00:11:03] <Joeskyyy> For me however, it's quttin' time. Have a good night!
[00:56:44] <ohlord> hello, i have a nested document structure in which i want to check for a certain id (modulid). i want to return a sub document of the elements found. unfortunately i'm getting some kind of _id error. here's the pastebin: http://pastebin.com/QTZFbtdD - how can i fix this?
[01:05:16] <ohlord> if i don't use linq it works
[02:35:48] <AlecTaylor> hi
[04:34:21] <ohlord> i need some help, i asked earlier but unfortunately nobody replied. i am trying to do a linq query searching for a value in the root document. but i only want to return other fields that contain nested elements. unfortunately i always get the error: "+ base {"Element '_id' does not match any field or property of class Praktikumsseite.Models.Linq.Bogen."} System.FormatException {System.IO.Fi
[04:34:21] <ohlord> leFormatException}
[04:34:28] <ohlord> what can i do against that?
[10:29:24] <ncls> hello
[11:30:58] <Kaim> hi all
[11:31:06] <Kaim> how can I use mongosniff on mongo unix socket?
[11:51:34] <asido> does mongodb have $search operator? I can't find anything in docs about it, but I see C# driver using it
[11:52:10] <Nodex> $search for what?
[11:53:51] <asido> Nodex, it creates a text search query using $search and $language
[11:54:46] <Nodex> perhas the run command if it's not in the driver spec?
[11:56:46] <asido> Nodex, I don't know how it's being executed internally, but calling Query.Text("some keyword") generates BsonDocument using $text operator with $search and $language conditions
[11:58:00] <asido> I am new in mongo. these 3 operators doesn't provide any clue to me. none of them seems to exist in mongo docs on mongodb.org
[11:58:31] <asido> https://jira.mongodb.org/browse/SERVER-12153
[11:58:57] <asido> they are being used here as operators, not inside runCommand
[11:59:04] <mauriyouth> hello! can i store photos in a mongodb document?
[11:59:17] <asido> mauriyouth, why not?
[11:59:55] <mauriyouth> or is better to store them on disk? and store only the link in the document
[12:00:00] <asido> mauriyouth, my experience in mongo is counted in days, but I'd recommend to take a look at BinData field type
[12:00:41] <asido> mauriyouth, or if you have large images and cannot guarantee that all of them will be bellow 16MB, then take a look at GridFS
[12:01:19] <asido> take a look at GridFS as well in case you want to keep file metadata automatically synced and deployed across a number of systems and facilities
[12:01:28] <mauriyouth> ok thanks! asido: i want to store them in mongo to increase locality
[12:02:38] <asido> mauriyouth, using GridFS also allows you to access parts of the file without loading all of it to the memory. not relevant for your photos, but just for you to know
[12:05:18] <themapplz> hello g'day hi there! anybody here who can help with a little map reduce question?
[12:06:31] <asido> mauriyouth, but don't consider storing them on disk manually. GridFS can do the same file handling operations + provides hand-holding to handle them easier
[14:24:11] <balboah> what can be the reason for one mongodb to stay very low in resident memory compared to the others when it really has much more traffic and data than them?
[14:29:25] <Nodex> perhaps the data is not being held in ram / doesn't have correct indexes
[14:29:40] <Nodex> and I assume you mean one shard rather than one mondb
[14:29:43] <Nodex> mongodb*
[14:30:39] <ferai> If I create an expiring index, is there a way to put documents in the collection that do not expire? Do I simply leave out the field that the index is keyed off of, or do I set it to zero...?
[17:49:24] <NaN> is there any method to get the last inserted item in the collection just after insert?
[17:56:06] <NaN> is there any method to get the last inserted item in the collection just after insert? (PHP Driver)
[17:56:14] <treaves> NaN: you'd still have a reference to it, so why would you need this?
[18:01:29] <NaN> treaves: I need to return the "created item" in order to populate data in the client side (backbone)
[18:02:37] <NaN> its kind what you say because I have the reference, but what about the generated _id?
[18:03:17] <NaN> treaves: so yes I can return the reference, but it has no _id and I need the _id too
[18:06:20] <treaves> If you read the documentation, it clearly states the _id is generated client-side.
[18:08:24] <NaN> with client-side you mean 'where the driver side is (PHP)'? (for me client side is the browser)
[18:08:49] <treaves> The client is what ever is saving the object.
[18:11:13] <NaN> PHP is sending for save, so PHP is the client
[18:11:15] <NaN> got it
[18:12:31] <NaN> then it's secure to generate the _id before send, append it to the object and save it?
[18:13:42] <treaves> Try it and see what happens.
[18:21:10] <NaN> treaves: looks ok for me, any advice?
[18:21:25] <treaves> No; that's how I use the C++ driver.
[18:21:25] <Draleth> Having a problem: the MongoDB shell (which I'm using to test an aggregate query) won't let me enter an object literal with quoted keys, like {"i._cls": 'Foo'}
[18:21:27] <treaves> Works fine.
[18:22:00] <Draleth> What's the correct way to $match on a value from a sub-document?
[18:22:08] <NaN> treaves: thanks :)
[18:38:24] <saml> is there db trigger?
[18:38:31] <Derick> no
[18:38:35] <saml> whenever a document is updated/created, i want to index to solr
[18:38:39] <Derick> but you can do tricks by tailing the uplog
[18:38:56] <saml> is there mongo to solr sync pipeline ?
[18:39:00] <Derick> saml: for that, i have an example implementation at http://derickrethans.nl/mongodb-and-solr.html
[18:39:07] <saml> thanks Derick
[18:42:07] <cheeser> we did that at my last gig
[18:44:27] <saml> cheeser, is your last gig open source?
[18:44:34] <saml> i would like to see your code, too, if available
[18:44:38] <saml> moar codes!
[18:47:39] <cheeser> it isn't
[18:48:07] <saml> but your code is the best code
[18:48:25] <saml> i'm gonna have product owner create a story for this so that i can work on it agile
[18:58:36] <Draleth> https://gist.github.com/amcgregor/7bb6f20d2b454753f4f7 -- this code works (provided you supply a valid date range and company ObjectId), however since this is my first use of aggregation, how can I improve this?
[19:07:41] <synth_> hello
[20:29:00] <NaN> is it possible to reformat a mongo date object in js? (browser) how?
[20:30:17] <NaN> the object I'm getting has sec and usec
[21:48:03] <swak> Anyone experienced with using scheme?
[21:53:04] <swak> Anyone experienced with using schema?
[21:55:59] <cheeser> using what?
[21:56:16] <swak> schema from mongoose
[21:56:42] <cheeser> ah. not a js guy.
[21:56:52] <swak> :)
[22:32:28] <komlev> hey guys, i have a question about query. I have property called "items" and this is array, each item in this array is an object - {color: 'red', name: 'Apple'}. How could i query all the objects from my database which contains 'red' color in items array?
[22:36:25] <komlev> so my object looks like this: {name:'Mister X', items: [ {name:'apple', color: 'red'} , {name: 'orange', color: 'orange'} ]}
[22:39:46] <komlev> sorry guys i get it
[22:56:06] <saml> Use tailable cursors on capped collections with high numbers of write operations for which an index would be too expensive.
[22:56:09] <saml> i can't parse this
[22:56:26] <saml> what does for which an index mean?
[22:56:55] <saml> is it like accidentally the whole database?
[22:57:15] <saml> i guess don't use tailable cursor
[23:08:18] <leifw> saml: this means "if a collection is being written to so fast that maintaining a useful index would make the writes too slow", then use a tailable cursor on a capped collection
[23:08:49] <leifw> I don't quite understand the whole statement, it isn't really a good suggestion IMO
[23:09:00] <saml> i don't know
[23:09:13] <leifw> If your indexed insertions are slow, use tokumx instead ;)
[23:09:35] <saml> https://github.com/mongodb/docs/pull/1541/files
[23:10:32] <leifw> That completely changes the meaning and is incorrect
[23:44:10] <edude03> Hello everyone, is it possible to use $all with an array of objects?