PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 16th of August, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:23:43] <wiltors42> Hey is anybody here?
[02:24:34] <wiltors42> I have a JavaScript mongoDB question that nobody at #Node.js can seem to answer
[02:50:14] <asteele> you should probably just ask it @wiltors42 if you want any chance of getting an answer
[02:50:57] <MrMrMrE> How can I query for all documents where a specific subdocument *doesn't* have a given field? I've been looking through the docs and googling and can't seem to find a select for a field being absent.
[02:55:18] <asteele> i thinkt here is an $exists oeprator ?
[03:08:39] <MrMrMrE> asteele: yep... don't know how I've missed it. TY :)
[03:08:58] <asteele> yw
[03:25:37] <wiltors42> Sorry for the delay
[03:26:00] <wiltors42> How do I query mongoDB with a value to return only one value?
[03:26:03] <wiltors42> In JavaScript
[03:26:19] <wiltors42> I need to use .findOne but I'm not doing something right.
[03:27:19] <wiltors42> asteele: I want to send it a name and have it return one value
[03:29:09] <asteele> wiltors42 maybe you should paste some example code of what you are trying to do - do you mean return only one part of the document, or one document entirely
[03:29:31] <wiltors42> Only want to return one part of the document
[03:30:10] <asteele> wiltors42 http://docs.mongodb.org/manual/tutorial/project-fields-from-query-results/ i think this can lead you to your answer
[03:52:53] <wiltors42> Ah ok, now I've got my value returning but I can only print it out on the server. It's not appearing on the rendered page...
[03:52:58] <wiltors42> I'll post some code
[03:54:04] <wiltors42> http://pastebin.com/TFS9bqcE
[13:25:34] <p1r4t3> anyone know why a C# driver would timeout, when it says connected and mongodb.log shows a connection?
[14:54:00] <Mia> Hello channel -
[14:54:27] <Mia> I have a question: I have a field called "type" in my doculemtns, and there are 5 differnt types of documents I record to my db.
[14:54:38] <Mia> How cn I a get a random document with a certain type?
[14:54:45] <Mia> *how can I query this
[15:01:21] <nisabek> to get a random doc, you either need to skip random number of docs and then take one, or have a random field in the doc and then query for that (gte smth)
[15:01:32] <nisabek> then you just add your type into the query
[15:01:44] <nisabek> and you get a "random" doc of you desired "type"
[15:01:55] <nisabek> here's something about random docs from mongo
[15:01:55] <nisabek> http://bdadam.com/blog/finding-a-random-document-in-mongodb.html
[17:15:34] <acidjazz> how can i query an array in an mongo object to have all the elements of an array i provide
[17:15:37] <acidjazz> does $in do that
[17:15:46] <acidjazz> or does $in just return it if only 1 element is in there
[17:16:08] <coderman1> how do i change the storage engine to wiredtiger so it defaults to that when it starts up? like when i do service mongod start...i have found how you can specifiy it on the command line, but i want it to be the default for all collections
[17:16:14] <acidjazz> yea $in is any, i need all
[17:18:33] <acidjazz> well
[17:32:36] <cheeser> compeman: http://docs.mongodb.org/manual/reference/configuration-options/#storage.engine
[18:03:44] <nisabek> @acidjazz - $all ?:)
[23:08:14] <nofxx> Shouldn't we have the namespace in ths method? https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/protocol/query.rb#L80
[23:08:45] <nofxx> And btw #payload is the default "inspect/log_message" method on drivers?