PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 11th of October, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:28:55] <frenchiie> i'm looking at this method: http://api.mongodb.org/python/current/tutorial.html#querying-for-more-than-one-document and i have a question about it
[00:29:35] <frenchiie> the find() method returns a cursor. when we use it to iterate over the documents of a collection, are we iterating over the documents as they were added into the mongodb database?
[00:30:33] <frenchiie> so if i add documents such as A,B,C,D will using the cursor to iterate give me A,B,C,D/D,C,B,A in order?
[00:31:12] <frenchiie> because it's being added to the database which is some data structure right? like a b-tree or b+ tree maybe?
[00:33:09] <frenchiie> anyone know how it iterates over the structure? :o
[00:33:46] <frenchiie> like a bfs?
[00:41:03] <frenchiie> dead tonight eh
[00:41:06] <frenchiie> :/
[03:28:46] <rubyronin> installed mongodb on windows 7. installation completed but I can't find it
[05:31:54] <frenchiie> so many people here but not one reply
[05:31:55] <frenchiie> : (
[05:32:03] <frenchiie> you all afk?
[05:48:20] <dabowheel> hello, I haven't been able to remove a document based on ObjectID in node.js
[05:48:33] <dabowheel> http://pastebin.com/RPHZa7bf
[05:49:04] <dabowheel> I'm not sure what I'm doing wrong
[07:00:54] <dabowheel> I figured out my problem. My collection name was missing an "s" at the end.
[11:29:40] <saif> hi all again..
[11:31:00] <saif> I need some help in enabling authorisation in config file. I cant understand what it is told in the doc. I tried authorization:enabled. But it doesnt work.
[11:31:56] <saif> mm. may be I am in the wrong time zone.
[16:03:38] <schu> hi there. i'm trying to connect remotely to a running mongodb server (I've added the user to the admin users collection as well as to the database I need to connect to) but when I do that and switch to the db, there seem to be no collections.
[16:04:22] <schu> this also happens when using umongo or other tools, which leads me to the impression that there is something wrong with the remote access setup (it is mongodb 2.4 by the way)
[17:03:51] <Seedmanc> Can I retrieve data from two collections at once with one API call?
[17:03:59] <StephenLynx> no
[17:04:07] <comm64x> hello, I'm new to mondodb. I'm using it with rails using mongoid as the odm. Is this the best place to ask general mongodb questions
[17:04:20] <StephenLynx> probably.
[17:05:53] <comm64x> I'm wondering how exactly do new documents get created and where exactly are they being stored. I have my models setup in rails, and my controllers are working fine but the only way I've seen to intereact with mongodb is through the shell. I'd rather be able to interact with the db programmatically through forms in the website for example. Does anyone know of any good resources for this?
[17:07:00] <comm64x> mongodb is the first document oriented db I've used. I'm most familiar with RDBMSs though
[17:09:09] <StephenLynx> I suggest you just use the driver for your runtime environment directly.
[17:09:14] <StephenLynx> without extra abstractions.
[17:09:38] <StephenLynx> http://docs.mongodb.org/ecosystem/drivers/ruby/
[17:10:30] <comm64x> I'm currently using mongoid
[17:10:51] <comm64x> from what I've found online that seems to be the most recommended odm for rails
[17:11:47] <StephenLynx> well, you asked for my suggestion.
[17:12:05] <StephenLynx> which is the complete opposite of using an ODM.
[17:14:06] <comm64x> Thank you for your advice. ILike I said I'm still very new to document dbs I just assumed from previous experience that the odm was necessary. If its not necessary I'll try what youve suggested. So, just to be clear, you're saying use the ruby driver as opposed to mongoid
[17:14:23] <StephenLynx> yes.
[17:14:39] <comm64x> ok thanks. Just verifying
[17:14:47] <StephenLynx> unless you are already experienced and you know EXACTLY what you would gain fron an ODM, I suggest not using any.
[17:17:28] <mloskot> StephenLynx, if I may chime in and ask about your last sentence: does it mean you'd recommend a newbie to avoid ODM before gaining more experience?
[17:17:42] <StephenLynx> yes.
[17:18:44] <mloskot> I see. Makes sense. I'm a newbie and I'm going to develop a basic web api/service using flask and mongodb
[17:19:37] <StephenLynx> I also advise against webframeworks, but thats not the topic at hand v:
[17:19:49] <mloskot> right
[17:21:47] <Seedmanc> So if I'm using mongo via API in my online app I have no way of hiding my API key?
[17:22:07] <Seedmanc> I saw AngularJS use it this way in their tutorial
[17:22:18] <StephenLynx> api key?
[17:22:38] <Seedmanc> To access mongo via data api interface.
[17:22:48] <StephenLynx> what api?
[17:22:51] <Seedmanc> No driver since I have no server to run it on
[17:22:56] <Seedmanc> uhh rest thing
[17:23:04] <StephenLynx> hold on
[17:23:17] <Seedmanc> https://api.mongolab.com/api/1/
[17:23:17] <StephenLynx> you are connecting directly from the front-end to the database?
[17:23:19] <StephenLynx> ah
[17:23:21] <StephenLynx> mongolab
[17:23:29] <Seedmanc> Is this a wrong channel?
[17:23:44] <StephenLynx> sort of, you got an issue with mongolab
[17:23:47] <StephenLynx> not mongodb.
[17:23:57] <Seedmanc> Is there a channel for that one?
[17:24:02] <StephenLynx> no idea
[17:24:18] <cheeser> mongolab has support. presumably you're already paying them for something...
[17:24:32] <Seedmanc> Just a sandbox account, I'm new to all this
[17:24:46] <StephenLynx> i suggest you install mongo on your development machine.
[17:24:48] <StephenLynx> or a VM
[17:25:15] <StephenLynx> using that api won't be anything as an actual production environment, probably.
[17:25:34] <Seedmanc> It's just a hobby project of mine.
[17:25:45] <Seedmanc> Ah well I'll try to obfuscate it a bit to hide it.
[17:26:19] <StephenLynx> ¯\_(ツ)_/¯
[17:58:27] <Seedmanc> If I need to get just a list of all document' names in a collection without retrieving entire documents, how do I go about it?
[17:58:36] <Seedmanc> Names as in every document has a "name" field in it.
[18:00:09] <StephenLynx> project only the fields you need.
[18:00:24] <StephenLynx> find({query goes here},{name:1})
[18:26:02] <Seedmanc> Assuming I can use an arbitrary (unique) string of text as an _id of a document, is it still limited to 12 chars?
[18:26:43] <StephenLynx> afaik, no.
[18:26:48] <Seedmanc> Thanks
[18:26:55] <StephenLynx> in the node.js driver, you have to instance it as an object id instance.
[18:27:05] <StephenLynx> and it thrown an exception for invalid values.
[18:27:15] <StephenLynx> throws*
[18:27:34] <StephenLynx> hold on, I read your question wrong:
[18:27:48] <StephenLynx> afaik, yes, you are limited to the format.
[18:30:03] <Seedmanc> Guess I'll use numbers then
[18:30:32] <StephenLynx> you REALLY need to touch the _id field?
[18:30:40] <StephenLynx> mongo takes care of that automatically.
[18:30:56] <Seedmanc> I wanted to put something meaningful there
[18:31:08] <Seedmanc> Akin to object property names
[18:31:11] <StephenLynx> pick another field.
[18:31:20] <StephenLynx> and make it unique.
[18:31:50] <StephenLynx> that's what I do