[15:41:02] <krion> is there a way to have only one shard on two replica ?
[15:53:26] <adamcom> you can have only one shard, but each replica set is a shard, so while a shard can have 1, 2, 3…12 replica set members, they are all a single replica set
[15:54:08] <adamcom> not sure why you would want one shard but 2 replica sets in any case - with how MongoDB sharding works, the concept doesn't make much sense
[15:54:22] <adamcom> unless I am misunderstanding the question, of course :)
[16:16:51] <krion> looks like they are redundant command
[16:17:08] <krion> like rs.remove() and db.runCommand( { removeShard:"" } )
[16:17:17] <adamcom> sh.status will work, because it is basically just a javascript wrapper for querying data out of the config database - it will technically work properly as long as you have an appropriate config database on the instance
[16:17:51] <TheRob_> Hi guys! I have one question about types that are being assigned by using the PHP MongoDB drivers batchInsert. Apparently they seem to be randomly variating between String and NumberLong. For example: Document 1 => "my_carrier" : NumberLong(129), "my_type" : NumberLong(2) | Document 2 => "my_carrier" : "126", "my_type" : "2". How can I prevent this and how can this happen?
[16:18:06] <adamcom> rs.remove() and rs.add() (and many others) are helpers - designed to make it less cumbersome to run commands
[16:18:34] <adamcom> as is db.adminCommand for that matter - it is a shortcut to avoid having to specify the admin database before running admin commands
[16:19:05] <adamcom> so not redundant exactly - they do the same thing, but they are there intentionally to make our lives a little easier
[16:20:26] <krion> adamcom: i'm hitting a either Unexpected token ILLEGAL or can't use 'local' database through mongos", "code" : 13644
[16:22:14] <krion> so i remove a replica set from himself ?
[16:23:04] <adamcom> replica sets exist independently of sharding, when you run rs. commands you are administering the replica set - so you run the command there
[16:23:16] <adamcom> rs.remove() removes a member of a replica set from the set
[16:48:26] <SpeakerToMeat> Question, is there any tool or method you preffer or use at all when anotating/designing schemas for documment collections? My mind tells me to use something like xsd but that's rpobably an horrible choice. This will be human read anyhow.
[16:48:49] <SpeakerToMeat> Documents, and probably.
[16:52:45] <krion> adamcom: do you got a minute for me in query ?
[17:01:28] <krion> i did that sucessfully, but nothing change http://pastebin.com/Ke2TftEK
[17:01:45] <krion> the chunks stay the same and i'm unable to move the dbs
[17:03:39] <SpeakerToMeat> Question, is there any tool or method you preffer or use at all when anotating/designing schemas for document collections? My mind tells me to use something like xsd but that's probably an horrible choice. This will be human read anyhow.
[17:06:38] <kali> SpeakerToMeat: some design through the ODM they're planning to use. other just use example documents with javascript comments
[17:52:10] <elfuego> lol, so the problem is, before I can use mongoimport I have to wait until mongod gets started, but mongoimport doesn’t have any context on when mongod is started
[17:53:07] <ron> cheeser, I see xy is not limited to ##java
[17:53:53] <cheeser> elfuego: the problem is what now?
[17:55:21] <elfuego> cheeser I need a way to initialize mongo with data, and not having to worry about mongod latency on startup
[17:58:26] <cheeser> and what's wrong with waiting for mongod to start before running mongoimport?
[18:02:37] <elfuego> cheeser need to script it in jenkins, and its causing some problems like DBClientCursor::init call() failed
[18:02:56] <elfuego> here is a snippet of the scrip https://gist.github.com/horaceheaven/66d9f8f1ea3d6df3eb94
[18:16:42] <dberry> I just moved my sharded replica set to a new datacenter and I now see latency issues. Are there primary/secondary issues that would generate latency issues?
[19:21:05] <einw1ck> Im busy migrating my application to mongodb from sql, what is the mongo equivalent of: " SELECT * FROM books WHERE title LIKE '%search%' "
[19:21:17] <einw1ck> Or is there a better way to perform a search
[19:22:10] <daveops> einw1ck: db.books.find({title: /search/}) would be mostly equivalent.
[19:22:36] <einw1ck> ah ok so the / operator is like the % in sql
[20:23:00] <samed> hi, i've removed a secondary from replset recently, now i see many logs like "replset couldn't find a slave with id 2"? how can i deal with this?
[21:01:48] <oblio> i just purged a bunch of data and db.stats() doesnt appear to have changed
[21:01:51] <oblio> is there a way to push a refresh?
[21:37:10] <SpeakerToMeat> I'll ask something here that I did somewhere else today and produced a slightly undesirable outcome. Is it very frowned uppon to use references/relations over embedding?
[21:38:01] <SpeakerToMeat> I seriously think the right solution for my schema idea is references (actually, it's using ancestor arrays). But I want to know the general take of the "community" (the few active people here willing to answer)
[21:40:16] <cheeser> i have to catch a train or i'd chime in. perhaps tomorrow.
[22:19:19] <chrismclaughlin> is there a way to keep versions of the data in mongodb? I am looking for something similar to what git does for source code
[22:44:14] <SpeakerToMeat> Are collections hard partitions, like tables in rdbms, or are they softer? that is, is it complex if I work with references, to relate documents in different collections?
[22:44:33] <SpeakerToMeat> For example a document's id is scoped at collection level only?
[22:45:31] <Boomtime> collections are basically hard partitions as far as the data is concerned
[22:46:11] <Boomtime> but there is some details under the bonnet.. like storage space, lock contention and permissions, that collections in the same database share
[22:52:34] <SpeakerToMeat> from what I read ObjectId is an object type in bson and not just represented as a string, and it's a type 1 uuid basically, right?
[22:57:24] <Boomtime> it would be a type 1 UUID if it was the right length
[22:58:08] <Boomtime> objectid is 12 bytes, UUID is 16 bytes
[23:02:58] <rh1n0-> i havent worked with mongodb in a while. Are there any good tools/clients that can help with refactoring raw mongodb queries?
[23:03:20] <rh1n0-> something that has explain plans or other info etc...
[23:13:14] <MyS> questions on installing mongodb and php, can someone help me?
[23:47:06] <styles> If I use the mongodb bulk operation but a record conflicts with an existing index or something & errors out, does the whole bulk operation fail?
[23:48:00] <styles> ContinueOnError seems to answer my question