[04:08:47] <safani> I want to sort products based on each category..this means a product may have a different sort order for each of the categories it is in
[04:09:00] <safani> what might be the best way to implement this
[10:21:32] <quattr8> I have a shared collection with a hashed _id shardkey does this mean I can't add datacenter aware sharding iwth a shardkey?
[11:44:57] <sQVe> I would love some advice on how to handle search in this case: I have a very large database with movies. The titles of the movies need to be searchable. My question is if this should be done with regex, full text search or another method that I do not know of?
[11:45:32] <sQVe> Any ideas? The movie DB is around > 200k records.
[12:23:34] <Nodex> sQVe : mongodb is probably not the right tool for that
[12:24:39] <sQVe> Nodex: What would you recommend then?
[12:25:24] <Nodex> something more suited to full text searching
[12:26:21] <sQVe> Yeah, I've looked at those options. It just seems a bit overkill when I only need the title to be searchable, and nothing else.
[12:27:16] <Nodex> Mongo can and will do it, it's just not the best tool for it and won't be as relevant as somehting dedicated
[12:28:35] <sQVe> Allright, I guess I'll have to look into elasticsearch and check it out.
[12:29:21] <Nodex> personaly I would recommend solr due to it's longevity, I found ES to be a little green when I last looked at it
[12:30:11] <sQVe> I might skip the movie DB all together and work with the TMDB API instead.
[12:30:24] <sQVe> I just dont like the limitations.
[12:30:41] <lineux_007> hey! quick qn. if i delete a capped collection and create a new capped collection (of the same size), will a new data file be created or will the space be reused?
[12:35:25] <cym3try> I have configured my first replica set on a testing environment. If the primary goes down (localhost:27017), and one of the secondary takes over (localhost:27018), how can i make sure that the failover is transparent to the app? can I use haproxy?
[12:41:48] <Nodex> pretty sure you can configure that in your connection string
[12:49:23] <lineux_007> any thoughts? if i delete a capped collection and create a new capped collection (of the same size), will a new data file be created or will the space be reused? do i have to keep doing repair db?
[12:54:38] <poff> Hi, i wanted to do something like this: db.PlayerRelation.aggregate( { $group: { _id: { $concat: [ "$who.getId().toString()"," ","$user.getId().toString()" ] } } } ); where $who and $user are both a DbRef, but it isn't properlly converting the DbRef to a String
[13:01:34] <Nodex> dbRef's are a convention, they have no special meaning in anything except some ORM/ODM's
[13:01:48] <Nodex> probably better to just store the id as a string
[13:03:23] <poff> but if a do something like this on the comand line it works: DBRef("Player", ObjectId("51a5e867d80041e429000000")).getId().toString();
[13:03:39] <poff> it gives me: ObjectId("51a5e867d80041e429000000")
[13:04:39] <poff> maybe i can accomplish that using map reduce than
[13:04:40] <Nodex> aggregation framework has no javascript methods available
[13:59:48] <hyperboreean> hey, I have the following structure: 'key1': {'key2': []} ... I want to know if key2 exists and doing {'key1.key2': {'$exists': True}} doesn't seem enough (using pymongo here)
[14:14:50] <kurtis> Hey guys, when doing large read/write operations, I notice the database gets heavily grid-locked. Is there a way to "de-prioritize" certain operations? Especially in the context of using an external (or even internal) map-reduce operation?
[14:19:17] <eldub> mongod dead but pid file exists -- how do I avoid this?
[14:20:24] <Nodex> did somehting kill the operation?
[14:20:50] <eldub> Fresh boot, just have mongod on chkconfig
[14:59:25] <t0th_-> can i change my sphinx full text search with mongodb ?
[15:02:31] <whattata> I've got a question: If I have a document that contains and array, and I want to be able to reference any given object within that array directly, is there a way to have mongo assign an id to each member of the array?
[16:50:46] <Nodex> t0th_- : if you;re system really needs good text search then you should use the right tool for that
[16:52:14] <eydaimon> What's the better architecture if my application is the host of multiple other applications: a) use a separate database for each application I'm hosting, or b) use one database and use collection prefix to keep the collections separate for each app.
[16:55:09] <cheeser> at my previous job, we'd just tag each entity with a customer specific ID and include that in all our queries
[16:56:06] <eydaimon> We need to have some separation in order to be able to bill for diskspace used etc
[16:56:19] <eydaimon> It seemed easier to separate it out by collection
[16:56:34] <eydaimon> Would there be any performance concern with doing a or b?
[16:56:47] <cheeser> that's probably true in that case. i might consider separate DBs at that point
[16:57:25] <cheeser> then your application code needn't be aware of the customer. you'd just have to connect to the correct database and then everything is simple.
[16:58:15] <eydaimon> Is there any concern with having thousands of databases then? We may host a lot of apps
[16:58:31] <cheeser> i wouldn't think so but I don't know 100% on that one
[16:58:55] <eydaimon> I also figured that if we do per database, there may be some internal sharding logic that is actually in favor of using 'a' as opposed to 'b'
[17:12:31] <kali> smw_: replica set is the way to go except for a handful highly specific scenario (if you need more than ~10 read slaves for instance)
[17:13:20] <cheeser> master/slave is deprecated, no?
[17:14:48] <kali> cheeser: i'm not sure it's "officialy deprecated", as it helps a few of these very borderline setups
[17:15:38] <kali> cheeser: http://docs.mongodb.org/manual/core/master-slave/ it does not say "deprecated" :)
[17:16:34] <Nodex> eydaimon : We can but don't, it's easy to aggregate
[17:17:07] <eydaimon> Nodex: SO you can aggregate each document easily?
[17:44:01] <smw_> how can I add a role to an existing user?
[17:44:13] <smw_> or modify their roles in any way
[17:44:25] <smw_> so far I have only been able to learn how to ad a user :-\
[17:44:52] <Nodex> eydaimon : in our setup we have a database per client (for their own stuff) and a master database that holds all data (multi tenant system) if that makes sense
[17:45:47] <smw_> I want to give my user readWriteAnyDatabase, userAdminAnyDatabase, dbAdminAnyDatabase and clusterAdmin which should make me all powerful
[17:48:52] <eydaimon> Nodex: yeah, so it sounds like you're doing a) then. How many databases do you have?
[17:49:04] <eydaimon> Nodex: and is there a limit that I shoudl worry about?
[17:51:09] <Nodex> per machine we limit it to 50 per box but that;s purely for managability and redundancy
[19:13:49] <eldub> I think there's confusion. in my mongodb.conf I specified an IP address, and when I type mongo it appears to be looking for 127.0.0.1
[19:13:54] <eldub> when I already changed that in the mongodb.conf
[19:14:09] <tystr> well if edit mongodb.conf you need to bounce mongod
[20:46:52] <eydaimon> Nodex: hey, when you said you have 50 clients per box, do you mean just that you add new hosts if you get more clients, or what exactly?
[21:22:50] <eldub> Does anyone have a guide for setting up a replica set with 3 nodes?
[21:52:36] <JakePee> Is there a specific reason in PHP driver, if a find() doesn't have any results, trying to iterate over the cursor throws an exception instead of acting like a 0 element iterator (and just breaking iteration)