[00:21:38] <_m> Quick google gives me this: http://stackoverflow.com/questions/2394532/apache-is-unable-to-initialize-module-because-of-modules-and-phps-api-dont
[00:21:57] <_m> Which should be enough to push you in the right direction,
[01:57:05] <Ephexeve> Anyone using mongo in Arch linux?
[06:57:14] <finalspy> hi everybody, does anybody knows of a way to add a replica set to a mongo instance which hasn't been started with -replSet and without restarting it ? In other words create a replica set on running instances of mongodb ?
[10:38:37] <plow> hi guys, I've got heterogenous data, ranging from say 1kb to 4mb per document, should I use gridfs or just a normal collection generally speaking?
[10:53:15] <samurai2> this is really confusing, it's said to do db.fsyncLock() before shutdown the mongod and do the backup, but if we do that, we can shutdown the mongod
[10:53:35] <samurai2> we can't shutdown the mongod
[10:54:05] <samurai2> then I need to do kill -9 the process id
[11:03:34] <kali> i don't care too much about consistency, my whole stack is designed to fail gracefully when something's missing
[11:04:55] <kali> anyway, if i need to use these backups, i'll have more pressing issues
[12:05:45] <kristaps> Is there a way to show the status of every member of a cluster (replicasets as shards) when connected to an appropriate mongos?
[12:22:01] <codemagician> Does anyone have an example code of using MongoDB with Zend Framework 2?
[13:29:56] <mcarroll> if I want to force our PHP application to connect to one specific mongo server that's part of a replica set, do you have to specify the replica set? or is it transparent to the application whether or not it's part of the replica set?
[13:30:59] <NodeX> you can give read preferences in the connect string
[13:34:16] <mcarroll> my problem is that we're getting a "master not found" error. while we're fixing the replication, I want to point directly to the master (instead of the replica set)
[13:34:56] <mcarroll> by just specifying one server, can I bypass the replica-set?
[13:48:42] <aster1sk> NodeX: I'll give it a shot, but I'm pretty sure the driver will figure out who master is and php_mongo_connection_force_primary()
[13:49:00] <aster1sk> NodeX: Aggregation is a $cmd, they behave differently.
[13:51:39] <[raymond]> I'm trying to export a collection using: "mongoexport --db website --collection users --csv --out /tmp/users.csv" but I'm getting the error "assertion: 9998 you need to specify fields"
[13:51:46] <[raymond]> From the documentation it looks like I shouldsn't need to provide a field list, am I reading it incorrectly?
[14:24:44] <aster1sk> I'm considering writing a web based mongodb data model creation tool complete with query builder.
[14:36:00] <remonvv> Not really. There's not a single thing PHP does better than a suitable alternative. PHP is legacy, so is Java for example to a large degree.
[14:36:00] <aster1sk> Jimmies Status : Somewhat less rustled.
[14:36:19] <remonvv> People use it because people used to use it.
[14:36:21] <ppetermann> remonvv: so what language would you like to use?
[14:36:41] <NodeX> I think in the next week or 2 10gen are releasing via their PR people a press release about my company so I'll be sure to include lots about PHP in there just for ron!
[14:38:55] <aster1sk> We're extremely write heavy and only Chuck Norris can upsert on positional, so I used the MySQL ID's as keys.
[14:39:04] <ppetermann> NodeX btw, hiphop is not really php.. its php code transformed to c++ and then compiled ;)
[14:39:05] <aster1sk> Thank you, highcharts are great.
[14:39:44] <remonvv> ppetermann, I use Java but that has similar issues of being somewhat vebose/outdated. I'd like to use something like Scala, Ruby, etc.
[14:39:59] <remonvv> Preferably something JVM based because I feel that's easily the most mature platform at this point.
[14:40:11] <NodeX> ppetermann : "Compiled but still php is what I said"
[14:40:14] <remonvv> I like language discussions. You can take either side and have valid arguments ;)
[14:40:22] <NodeX> i/e php used to write it then turned into whatever
[14:40:28] <aster1sk> Still playing language wars eh?
[14:51:21] <aster1sk> Also I must add : dvorak > qwerty
[14:51:27] <Vile> task is to find a document based on a number of search terms, which can appear in the documnet itself or in the any of the folders above
[14:51:30] <remonvv> NodeX, argueing PHP is good -> brain fried
[14:52:31] <ppetermann> so make your argument why it is bad, but please dont copy that horrible article that everyone is linking in the last half year when talking about php, cause half of it is factual wrong
[14:55:13] <aster1sk> Aim: I switched abotu three years ago, never looking back.
[14:55:14] <NodeX> Vile : I really dont see the problem
[14:55:54] <Vile> NodeX: imagine you have 1 000 000 documents, and the top folder updated every few seconds
[14:56:00] <NodeX> Unlike (literally!) every other language with a similar operator, ?: is left associative. So this: <---- in no language should you EVER stack tenery operators - this guy can't even write good code
[14:56:24] <NodeX> Vile then the top folder get's updated in the DB
[14:56:44] <Vile> and all of the enclosed documents must be updated as well
[14:57:45] <aster1sk> I must add git to that stack as well, I've a openvz CT I build gitlab on top - srsly the most awesome.
[14:58:00] <NodeX> those documetns dont directly contain that string
[15:00:02] <Vile> but if i search using two terms and one of those terms in the document and another in the folder that contains the document, this is considered a match.
[15:00:31] <ppetermann> ron: thats the horrible article i spoke about :p
[15:00:39] <Vile> or contains a folder that contains a document
[15:01:05] <aster1sk> That article was ridiculous. The tool box analogy was just silly.
[15:01:25] <ron> ppetermann: I didn't read 90% of your chatter. this issue bores me now.
[15:02:18] <ppetermann> i see, you learned from my tactics earlier.
[16:17:33] <Bartzy> NodeX: Hey, sorry, was away. About NumberLong("34253245325") - the quotes are supposed to be there? Because sometimes they are there and for smaller numbers they are not there.
[16:17:57] <Slaytorson> Okay.. Sorry about that. I was the guy who made my nickname mongodb lol
[16:18:15] <NodeX> it's to do with 64bit int's Bartzy ... if you ask Derick he can explain better than me
[16:18:15] <wereHamster> Bartzy: my guess would be that they are there if the number can't be represented by a javascript number.
[16:18:17] <Slaytorson> ron: the ride is over.. Fun wasn't it?
[16:18:33] <Bartzy> wereHamster: That makes sense, thanks
[16:18:33] <ron> Slaytorson: dude, I did NOT ride on you.
[16:22:59] <Slaytorson> wereHamster: I am wanting to know if anyone has any positive and/or negative experiences with any of them. I am looking for one for mission critical business applications. Obviously I found 3 of them.
[16:26:25] <Slaytorson> Ron: wereHamster: I have googled and done plenty of research. I figured I would ask people specifically in this channel because, well it is the mongodb channel. If you haven't had experience with any of them then you shouldn't be duesh bags about it and you should keep your mouth shut.
[16:27:02] <ron> Slaytorson: I fear that the channel isn't active enough to have people with relevant opinions, but you'd have no way of knowing that unless you're a regular.
[16:39:00] <aster1sk> Yeah, they must have a lot of something... Can't imagine how much traffic they get... I could see that being the bottleneck here.
[16:39:16] <NodeX> Replica Set: Large 10 GB Yes $299 <---- how much? LOL
[16:39:19] <aster1sk> I just changed my connection string and it was functioning immediately without any BS
[16:39:45] <NodeX> that's like a days's work for me
[17:26:21] <wereHamster> awc737: whenever you load the document from the database, and the field is not set, you assume the default value. If the field is set, you take whatever it's set to.
[17:26:38] <awc737> wereHamster, you said theres no need to store it in the database. but I do need to store who gets that field on their profile
[17:26:46] <awc737> which could be groups, or even users selected individually
[17:27:38] <zane> So... I did something stupid and modeled a collection in Mongoose with the name "stats". Needless to say, I can't find a way to interact with this collection from the shell... eg, db.stats.renameCollection "is not a function"
[17:27:59] <awc737> NodeX, that solves my needing to specify who inherits which fields?
[17:31:06] <NodeX> if it's index bound then it could be deemed expensive - as wereHamster says depends on the number of docs
[17:34:19] <joec> I have a secondary server running 30 minutes behind and the web app that accesses it is coded to allow secondary, is there anything I can do server side to force only reads from the primary?
[17:36:33] <wereHamster> joec: that is something you configure on the client.
[17:36:56] <joec> thats what I was afraid of, I'll have to see if the devs can hotfix it
[17:38:02] <dblado> hi all -- found a post online about saving a deref() function to the server to get referenced documents but not sure how to run the custom js function with the find() -- anyone point me in the right direction?
[17:38:13] <Bartzy> wereHamster: Never thought about that - not saving default value for most records on the DB, and setting it when I load the model...
[17:38:26] <Bartzy> wereHamster: Doesn't that complicate things if you do it a lot ?
[17:43:43] <NodeX> does that map it all back and update all the relevant docs?
[17:43:49] <jawr> http://api.mongodb.org/cplusplus/current/classmongo_1_1_b_s_o_n_obj.html#afdb218ee1301ab651692f96bec95d0d9 once i get an ObjectID, how do i extract the creation date?
[17:43:54] <wereHamster> NodeX: then I'm not understanding your question. Do you mean if I want to set the default value on all documents in the database?
[17:45:24] <NodeX> no, you said that you just do "field: { type: String, default: 'teh default value' } and I'm done." if you use an ODB
[17:46:11] <wereHamster> NodeX: all it does is: after loading the document from the database, if the field is not set, set it to the default value. So in my application the field is always there, set to a non-null value.
[17:46:34] <Bartzy> or null, if that's the default :D
[17:46:40] <NodeX> yes but that's not really a help if you want it in the database and dont want to wait for the ODM to update everything
[17:47:10] <wereHamster> if you want it in the database then you have to $set it, there is no way around that.
[17:47:29] <Bartzy> wereHamster: Are you using a custom ODM ?
[18:04:14] <awc737> so in mysql I will have a users table, and a users_attributes table. users_attributes will just have id / key / value / ordering
[18:04:54] <awc737> if the admin adds new user_attribute, such as 'website', and only selects one user group, it will then add that key / value pair to each user document in that group
[18:07:24] <NodeX> because modeling an app to work in both will be a headache because Mongo is so flexible
[18:07:27] <awc737> wereHamster, my reason is that I don't know what key / values a product might have. i might define one globally for all products, and I might add one to one product
[18:07:41] <awc737> the global definition is the reason I still want some SQL
[18:07:43] <NodeX> you will drop that flexibility because*sql isn't so flexible
[18:08:25] <NodeX> you might be better asking if you cna do your app without SQL all together
[18:08:57] <awc737> i'm not sure, alot of people have told me don't
[18:09:23] <wereHamster> so why do you want to use mongodb?
[18:11:55] <awc737> trying to decide which is best. My company uses SOLR becuase they think they need "fast indexing for search queries", and I thought I should probably look for something comparable
[18:12:03] <awc737> I was led to believe it was with nosql
[18:12:25] <wereHamster> awc737: mongo is not a search engine.
[18:12:56] <awc737> right, but I will probably use elasticsearch, in which case having my products with an attributes key/value, would probably play nice in sending that data to ES
[18:13:12] <NodeX> mongo and ES also play nicely together
[18:13:26] <NodeX> ES is a little green and buggy for my taste but I know plenty of people who do use it
[18:13:43] <awc737> so I was thinking let me admin define fields in SQL, select which groups or users receives that field, and that stores the attribute / default value into the product document
[18:14:16] <wereHamster> to me nothing so far would suggest that you need mongo
[18:14:38] <NodeX> ^ not to say it can't be done in mongo lol
[18:15:05] <awc737> the concept here, (also relevant for Mongo), is what leads me to believe I *should* use NoSQL: http://neilmiddleton.com/the-wonders-of-hstore/
[18:15:32] <awc737> if you just look at the INSERT INTO products code snip
[18:15:34] <wereHamster> well, if he already has an existing sql database, and wants to keep using it, then adding yet another database is unnecessary overhead
[18:15:56] <awc737> no i don't really have anything yet, still planning
[18:16:13] <NodeX> if you have the need for flexible schema's that your app decides on then I suggest mongo
[18:16:27] <NodeX> among the other main reasons (speed, scalability)
[18:16:38] <NodeX> if you dont then I would save the headache of learngin soemhting new
[18:18:04] <awc737> well I was thinking both would be nice because my admin could define a global attribute, and I could use SQL relationship to determing which products had the attribute
[18:18:24] <NodeX> you can do it all in one or the other
[18:18:24] <awc737> and IF the attribute value is changed for a specific product, then that changes the product's document value
[18:18:36] <NodeX> there is NO river from SQL to mongo
[18:18:48] <NodeX> you can't plug somehting into the DB to auto update mongo
[22:31:04] <opus_> I'm pulling results from my collection, which contains rows of rows. I want to modify one of those rows inside the result, do I really have to do forEach and then find it then modify it?
[22:32:25] <_m> opus_: In pure mongo, I would use the positional operator with and update query
[22:32:42] <opus_> like, this is sort of what I want to do: db.company.find({name:"bob"}).find({store:"washington"})
[22:37:20] <_m> So you want to find the company with a specified 'name', and a 'store' nested document within said company's document, correct?
[22:37:36] <opus_> i'd be nice if I could just db("collection.company").find("bob").("stores").find("washington").set("status=closed") (obviously psuedo code)
[22:49:28] <_m> If that field is an array within a document, you'll want to prepend the container field's name to that query. EG: db.foo.find({ "bar.tables.number" : 1 })
[23:01:28] <jtomasrl> so i need to "select" the table number = 1 from there
[23:03:48] <_m> You can do the filtering client-side, or move the tables to a separate collection. By http://www.mongodb.org/display/DOCS/Retrieving+a+Subset+of+Fields - only the tables field - this should be reasonably fast.