[06:18:23] <KekSi> i asked yesteday and didn't get an answer -- does anyone have an idea whether the mongo java drivers v2 and v3 will both be supported in the future? or is v2 going to die out?
[06:43:21] <repxl> can anyone help me ? im on jessie installed php5-fpm, php5-mongo and mongodb now i trying to connect from php but can't in php.ini i see mongo is installed and the mongodb running too on localhost
[07:11:49] <repxl> 2 hours still no connection between php mongo ..
[07:14:51] <repxl> did this http://geoff.com.au/content/install-mongodb-nginx-php-ubuntu and when i var_dump new MongoClient() i get a mongo object with : public 'connected' => boolean false
[08:03:13] <Derick> it only connects when you actually do something with it
[08:04:57] <repxl> Derick hmm ok so i try to insert something from php side and then try to find it from the command line on the server.
[08:07:06] <Derick> repxl: can you show the whole code as to how you inserted it, and then whole transcript of what you did on the command line on the server (including connecting with "mongo")?
[08:10:59] <repxl> Derick ok this is the php script i run to insert something into items collection http://pastebin.com/VRqtVzSH and here is how i search that inserted value in Command Line nothing found :( http://pastebin.com/td3hakyc
[08:16:41] <Derick> I think that using "Mongo" will now trigger an E_DEPRECATED warning too - so don't use it :)
[08:25:36] <repxl> Derick one more question when you using try {} catch with a mongo insert function for example do you use the "MongoConnectionException" or the "MongoException" or just "Exception" ?
[08:31:27] <Derick> repxl: MongoException is the parents of all the other Mongo*Exceptions
[08:31:33] <Derick> Just Exception would be for PHP things
[08:46:52] <scruz> i can run a mongo shell to my local server, but trying to restore a backup using mongorestore fails with the message “no reachable servers”. what can i do about this?
[09:23:39] <mapc> I am trying to build libmongo/mongo-c-driver
[09:24:00] <mapc> at the moment, and I run into 'src/env.c:320:21: error: storage size of ‘ai_hints’ isn’t known'
[09:25:17] <mapc> The error is triggered by -pedantic
[09:26:09] <mapc> It also complaints about getaddrinfo and the associated methods being declared implicitly, even though I explicitly added the headers (sys/types.h sys/socket.h netdb.h) to the file
[09:26:21] <mapc> so I could Imagine it's some kind of macro problem?
[10:01:03] <basiclaser> I have a list of items stored in a mongoDB which are represented on a webpage in the same order. I am currently creating a 'drag and drop' reorder feature so people can reposition the list entries. Would you suggest trying to directly reindex the mongoDB entries or to give each item in the mongoDB a indexPosition: 0 key:value attribute and just change that?
[10:30:47] <joannac> please don't actually try that. that will perform *really bad*
[10:32:06] <repxl> joannac i have a users collection and i want to search users by email to ensure that email already is registred
[10:34:16] <joannac> then lowercase the email address
[10:36:29] <repxl> joannac okey, im new to indexing can i leave this out now and do later a full collection index update or it will be too late for indexing when i will allready have some 200 users in my db ?
[10:37:27] <joannac> you can index later. but you'll be doing collection scans in the meantime
[10:38:14] <repxl> joannac k np for now it can do a collection scan i don't care the db is not big now.
[10:38:38] <repxl> joannac i just wanted to make sure there will no be problems after to do a "massive indexing" on my desired fields ..
[10:39:22] <joannac> well, the larger your collection, the longer it will take
[10:40:11] <Derick> also, don't forget that "derick+mongodb@example.com" and "derick+php@example.com" are the same email address
[10:40:14] <repxl> joannac you mean the indexing process after or the load time now ?
[10:41:20] <Derick> hence my wildcard domain email
[10:41:59] <repxl> joannac , Derick so i should don't let my users allow a "+" to enter into their email adresses so no collisions will happen or how to thread this .
[10:49:00] <Derick> I was merely trying to show that email normalization is not a simple thing to do
[11:13:37] <repxl> joannac , Derick i do use "remember me" function on my logging area now i think if i should add a field like "auth_token" and if that is set i know that user has the remember me function enabled and when he disable it completely remove the "auth_token" field is that a good way in mongo to remove and appear fields or i should better keep that field for ever and instead just switch "value" / "null"
[11:51:19] <repxl> does the _id changes ? or i can use that for identify my user document
[11:54:23] <cheeser> the _id field can never be changed.
[13:17:41] <lurker221> hello, I have a question regarding the course here https://university.mongodb.com/courses/M101JS/about
[13:18:05] <lurker221> what are the parts regarding mongo 3 ?
[13:18:18] <bahamas_> hello! Im to enable mongo's rest http interface (with auth=true, rest=true and httpinterface=true in mongod.conf file). My feeling is that the rest interface try to authenticate in mongodb using CR authentication method instead of SCRAM-SHA-1. So I think if I create manually the field "credentials.mongo-cr" under the admin.system.user collection,
[13:18:18] <bahamas_> the rest interface will work fine. Any clue? Thanks!
[13:20:45] <lurker221> are most of the video material about mongodb 2, or it is updated with mongodb 3 new features?
[13:23:30] <bahamas_> lurker221: depends on the video. which one are you looking for?
[13:25:07] <lurker221> was there any updates to this section ? Week 5: Aggregation Framework
[13:27:15] <bahamas_> lurker221: i found a PDF written by mongodb people. very recent material. take a look: http://docs.mongodb.org/master/MongoDB-aggregation-guide.pdf it is not a video but can help you. I think as it is a document from last month they consider it to be used with mongo 3.x.
[13:28:16] <bahamas_> oops. now I saw... last version is from yesterday.. kkkk
[13:29:39] <_KryDos_> hi Guys. Hope you can help me. I have documents which are looking something like this {parent:{param1:value1, param2:value2}}. I don't know they names of "param1" and "param2" and I need to make $like searching in the "parent" field by key and value. is it possible at all?
[13:30:27] <_KryDos_> Maybe I need to write JavaScript function? but I don't know how. I'm using mongoshell and I tried to print some values but I see nothing. I tried print() and console.log()
[13:30:36] <bahamas_> _KryDos_ you wanna find without knowing the name of the key ?
[13:32:14] <_KryDos_> there is $where statement... I thought I can write a function which will do kind of forEach by key and value and I will be able toString key and values and manually do comparison.
[13:58:29] <Derick> yeah, for that case, the rest interface might be a good thing
[14:00:03] <bahamas_> @Derick, the problem is that the rest interface doest seem to work good when I access remotely (not using localhost). I think it also does not work well with SCRAM-SHA-1...
[14:38:06] <surrealchemist> Anyone know if there is a way to set the frequency other members in a replica set are polled? I basically need to do some testing and simulate the situation where no primary has been elected yet to see how the application behaves.
[14:38:32] <surrealchemist> I might end up just stopping 2 of the 3 members, but was wondering if there was another way.
[14:39:22] <cheeser> *mumble**mumble*something about configuring heartbeats*mumble**mumble**mumble*
[14:44:31] <surrealchemist> I guess its hardcoded eh? heh
[14:45:06] <surrealchemist> Probably more work than just shutting down a couple servers temporarily anyway
[14:47:42] <surrealchemist> Jusr found replSetGetConfig.settings.heartbeatTimeoutSecs but I think I'll just do the simplest thing and stop the servers instead of reconfiguring the replica set just for a short test
[14:49:11] <cheeser> i knew it was out there had to track it down
[14:49:54] <surrealchemist> Took me a few searches before I found it. The section describing replica set voting mentions heartbeats and 10 seconds but nothing about being able to change it.
[15:01:34] <vagelis> I used mongoexport for some documents and mongo changed date values to $date and now that i want to insert these documents complains. How should i do it?
[15:01:51] <vagelis> OR am i missing something? Im not an expert :S
[15:02:18] <StephenLynx> I heard mongodump is a better tool for migration
[15:07:15] <cheeser> mongodump will preserve the bson types. mongoexport will convert them to json which may not roundtrip as cleanly.
[16:44:13] <deathanchor> it was pretty consistent for me :)
[16:44:25] <deathanchor> but dump/restore is 10x faster than export/import
[17:28:36] <fartface> This might (probably will be) a stupid question, but--if it's possible to do "relational style" databases in Mongo, what's the disadvantage of doing them?
[17:29:52] <fartface> Like, if I had a relational database where I had 3 tables all related to each other, and to get data about a single "thing", I'm doing 3 queries in SQL to get the desired data, how is that "better" than modelling the data basically the same in Mongo and running those same queries?
[17:30:26] <fartface> Is it just computationally more expensive for different data sets, or am I missing the point entirely and should just pack up my shit and leave the channel immediately?
[17:33:31] <MacWinne_> we have a pretty massive problem where a collection has become empty over night.. trying to track down how it happened to prevent it from happening again. Is there a quick way to search mongo logs to find when this happened?
[17:33:34] <preaction> relational databases (usually) describe the relationships in the schema. a mongo collection does not (don't use DBRef). SQL was designed for humans to run ad-hoc reports over those relationships. in Mongo you'd have to use the map-reduce stuff (or something new i forgot what it's called)
[17:37:20] <preaction> in mongo, you're generally supposed to turn "has-a" or "has-many" into subdocuments if possible. many-to-many are difficult in all situations. and some has-many relationships where the contained item is important to stand on its own are easier in a relational db (imho)
[17:38:49] <fartface> That's the part that I'm really struggling with from a modelling standpoint--basically deciding whether I should embed the entire document as a subdocument, or have it in its own collection and only embed a key
[17:40:16] <fartface> But I guess that's the nature of the beast, haha!
[17:43:41] <StephenLynx> that depends on how you are going to read the data.
[17:43:59] <StephenLynx> how large would the document become if you were to embed the data.
[17:44:06] <StephenLynx> how often would you update the document
[17:44:27] <StephenLynx> how complex would the document become
[18:09:07] <diegoaguilar> Hello is there a way to export mongo docs
[18:09:15] <diegoaguilar> to json WITH comma per doc
[18:51:21] <MacWinne_> holy crap. If you are using Mongoose 4.1.4 updated immediately. There is a nasty bug where it can potentially remove all items in your colection if you call myDocumentModel.remove(). it doesn't just remove the single document
[19:43:59] <Fetch> does OpsManager (MMS) try to run something via sudo on startup?
[19:44:07] <Doyle> Hey. What does "undefined behavior" mean? Avoid accessing an un-sharded collection during migration. movePrimary does not prevent reading and writing during its operation, and such actions yield undefined behavior.
[19:44:35] <Fetch> when I try to automate its install with Puppet it fails with a sudo message in the logs. I can start it by hand no problem
[19:45:16] <Doyle> Does your puppet process run under a user that doesn't have permissions for it?
[19:57:31] <deathanchor> I'm having a hard time finding out what is locking up my mongodb collection periodically