PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 17th of September, 2012

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:30:19] <timeturner> vsmatck: the thing is that I have a bunch of posts, which have one tag each, in a blog
[00:30:28] <timeturner> but the number of posts could be infinite
[00:31:11] <timeturner> so I don't know if it would be safe to store the post objectids with the tag in an embedded arrray in the main blog document
[01:32:20] <igotux> say, i have 3 hosts for setting up replica sets and if the primary goes down, secondary gets promoted as primary.. but do i ensure my application will talk to thew _new_ primary?
[01:32:35] <igotux> *how do i ensure
[01:42:20] <eydaimon> is it possible to go backwards from the objectid to get a timestamp? IIRC the objectid is related to time somehow
[01:57:21] <timeturner> igotux: it is automatic
[01:57:30] <timeturner> the client doesn't talk directly to the mongod
[01:57:43] <timeturner> your app's client talks to the mongos
[01:57:49] <timeturner> and mongos talks to mongod
[01:58:04] <timeturner> so mongos takes care of the actual routing
[01:58:18] <timeturner> it is transparent to the app
[02:00:28] <igotux> i see.. let me check it out that .. ty timeturner
[02:00:58] <igotux> if the client talks to mongod, then i need to update dns cname and point it to secondary manually..correct
[02:35:21] <Ventrius> Hello!
[02:36:06] <Ventrius> I haz question onf replication/sharding: Is it possible to have 2 local servers that have their own data
[02:36:22] <Ventrius> and then have a "master" server that stores both of their datas
[04:38:35] <igotux> can i run my production setup with replica sets and not sharding ?
[04:39:36] <igotux> say, my db will grow upto 500G of data .. hence am planning to use 3 servers , in which 2 servers are having 750G of disks and 16G of ram and one small node for arbiter
[04:39:49] <igotux> in this setp, is it ok not using sharding ?
[04:43:32] <igotux> timeturner: as you said earlier, mongos available only if i use sharding ..correct ?
[04:55:57] <abstrax> hi mongo
[04:56:14] <abstrax> i am storing created_at agaianst each record, do you recommend MongoDate or a timestamp integer?
[04:56:39] <abstrax> IN mysql, i would do a date because i get access to amazing date/time functions, but what about mongo ? need some suggestions :)
[04:57:01] <igotux> abstrax: can you get the timestamp from the objectid ?
[04:57:57] <abstrax> i dont know, is that possible ?
[04:58:34] <igotux> abstrax: looks like possible https://jira.mongodb.org/browse/SERVER-857
[04:58:40] <abstrax> hm i see getTimestamp in shell
[04:59:29] <abstrax> so what should i do ? store none and use objectid for timestamp ?
[05:02:40] <mrkurt> igotux: 500GB of data is a lot to manage when things go wrong
[05:03:04] <mrkurt> and unless you have a really weird workload, 500GB of data with only 16GB of RAM might be a disaster
[05:03:30] <mrkurt> so get more ram :)
[05:03:34] <mrkurt> then maybe think about sharding
[05:03:39] <mrkurt> but try without first
[05:03:49] <mrkurt> the first time a secondary syncs will teach you a lot about what's happening
[05:04:20] <abstrax> so..?
[05:04:22] <igotux> mrkurt: now my data is around 50G ... 500G is the projection...
[05:05:39] <igotux> you see any smokes in this design .. because for me, sharding doesn't look simple... and needs more nodes as well..so wondering any issues if i go with just Replica Sets only
[05:06:25] <ron> replica sets = high availability. shards = scaling out.
[05:08:11] <igotux> when i should go for shards.. usually what should be your data size when people consider using sharding in production environment ?
[05:08:24] <chovy> my save seemed to work in nodejs, but when I type 'show collections' in mongo console, nothing is returned.
[05:11:40] <vsmatck> igotux: It's not only a function of data size.
[05:12:49] <ron> chovy: you may have the client configured to ignore errors. I don't know node.js so I can't give you exact pointers.
[05:15:52] <chovy> i'm using mongoose. All the examples I've seen just pass an error callback to foo.save
[05:18:49] <timeturner> how many objectids do you think can be stored in an embedded array before it hits the size limit
[05:19:31] <timeturner> is there a way to calculate this
[05:22:42] <vsmatck> You could read the BSON spec or do a experiment to find out exactly how many.
[05:22:57] <vsmatck> Experiment probably easier.
[05:24:30] <mrkurt> igotux: if you have write lock problems, sharding is a solution
[05:24:45] <mrkurt> but you should scale vertically as much as possible before sharding
[05:25:13] <mrkurt> if data is actually growing quickly, though, I'd probably start thinking about it at 300GB or so just to keep things manageable
[05:25:30] <mrkurt> it is complex
[05:25:51] <mrkurt> you don't want to get too far in a hole, which means if you're ever going to have to shard you can't wait too long
[05:25:59] <mrkurt> but you don't want to do it too soon because of all the moving parts
[05:28:34] <mrkurt> all of this assumes you only do 10-1 ram, if you buy nice servers with >200GB of RAM you can hold off longer
[05:32:56] <ron> chovy: another possibility is that you're looking at the wrong database.
[05:34:23] <chovy> i found it.
[05:34:48] <ron> :D
[05:35:22] <chovy> i was passing my schema to mongoose.model instead of db.model
[05:35:42] <dross> :)
[06:08:57] <igotux> ty mrkurt
[06:30:55] <igotux> so if i use only replica sets, if the primary goes down, i need to manually ask the application to connect to the new primary..correct ?
[06:31:08] <igotux> since i'm not using sharding, i can't connect to mongos..am i correct ?
[06:32:06] <timeturner> mongos is part of every mongodb setup
[06:32:10] <timeturner> regardless of sharding or not
[06:32:17] <timeturner> you neevr talk directly to mongod
[06:32:21] <timeturner> never*
[06:33:21] <timeturner> which is why you can basically type "mongo" in bash and start interfacing with mongodb
[06:33:29] <timeturner> you don't need to tell it which port
[06:33:35] <timeturner> or anything like that
[06:38:30] <igotux> timeturner: so in my 3 node replica set, apart from starting mongod process on node-1 and node-2 , do i need to start mongos process as well ?
[06:39:13] <wereHamster> igotux: you don't need mongos in a replset. Only when sharding
[06:39:24] <timeturner> actually yeah
[06:39:34] <timeturner> mongos is for sharding only, sorry
[06:39:40] <igotux> i see...
[06:39:44] <timeturner> I'm the one who is confused :P
[06:39:53] <timeturner> but having said that
[06:40:01] <timeturner> you don't need to manually restart the failed primary
[06:40:09] <timeturner> it should do it automatically
[06:40:23] <timeturner> now if it fails completely, like it cannot restart
[06:40:33] <igotux> so in my use case, if the primary goes down, i need to point the application to secondary IP ( which is the current master) or change the cname in dns
[06:40:43] <timeturner> then you will need to manually fix whatever the problem is and rejoin it to the replset etc.
[06:41:40] <wereHamster> igotux: the driver should do that automatically
[06:42:17] <timeturner> it should recover, yeah
[06:42:28] <timeturner> but I don't understand how it does that actually
[06:42:32] <Venemo_N9> hi
[06:42:32] <timeturner> now that I think about it...
[06:42:33] <wereHamster> mongo will re-elect a new master, and the driver should automatically switch to it
[06:42:54] <timeturner> how does the driver even know that the primary has died?
[06:43:02] <timeturner> and to switch to a different port
[06:43:03] <wereHamster> timeturner: it doesn't answer?
[06:43:10] <wereHamster> or the connection is reset?
[06:43:18] <timeturner> ahh yeah I forgot
[06:43:23] <igotux> wereHamster: my driver will be aware of only the master ip na ?.. or is it like, we need to feed both primary and secondary IPs to driver ?
[06:43:25] <timeturner> you have to add all the replset members
[06:43:27] <timeturner> in the app
[06:43:33] <timeturner> mongo driver ^
[06:43:38] <Venemo_N9> what's the mongo db alternative to SQL's varbinary or image columns?
[06:43:38] <timeturner> so your driver already knows
[06:43:45] <timeturner> what the replsets ips are
[06:43:56] <wereHamster> igotux: you should give the driver more than one IP, but it will also work if you give it one
[06:44:17] <igotux> got it..ty wereHamster and timeturner
[06:44:18] <wereHamster> igotux: of course, if you give it one and that server is down while your application is trying to establish a connection to your replset, it will fail
[06:44:37] <timeturner> so be on the safe side and give it all the ips
[06:44:51] <timeturner> that way it can figure out who is the new master or who it should read from etc.
[06:44:57] <wereHamster> igotux: so you usually supply multiple addresses (does not need to be all) and the driver will discover all the nodes
[06:45:31] <igotux> wereHamster: the driver will always writes to the master ..correct..
[06:45:45] <igotux> so at any point of time, i can take down seconary for maintenance
[06:45:49] <wereHamster> yes. mongodb can only write to master
[06:46:01] <igotux> kewl...makes sense..was just confirming :-)
[06:46:27] <wereHamster> igotux: have you even read http://www.mongodb.org/display/DOCS/Replica+Set+Tutorial ?
[06:46:39] <wereHamster> or http://docs.mongodb.org/manual/core/replication/
[06:47:24] <igotux> read the almost same content from other source.. not doc.mongodb.. will chk this out as well
[06:47:56] <wereHamster> igotux: it's best to start with the official documentatino first.
[06:50:31] <igotux> sure wereHamster
[07:00:45] <timeturner> qq, is there a problem using ObjectIds for a majority of the querying?
[07:04:35] <timeturner> for example, there is a users collection in which each user has an array of objectids in which each is an objectid to a single "tag" document in the tags collection. The tag document itself doesn't have much value but the objectid of the tag document is referenced by many post documents in the posts collection. would it make sense if I were to query for all posts that have the tag field equal
[07:04:35] <timeturner> to any one of the ObjectIds stored in the user's field of an array of ObjectIds?
[07:21:48] <ppetermann> win 19
[07:21:51] <ppetermann> sorry =)
[07:39:41] <[AD]Turbo> hola
[10:24:29] <elricl> What happends when a mongod takes lock on a config server and then goes down?
[12:00:41] <elricl> What happends when a mongod takes lock on a config server and then goes down?
[12:14:34] <ezakimak> how do you create/save a server-side function from pymongo? I can do it from the shell, but the examples i found don't work from python: db.system_js.funcname = "function(parms) { ... }"
[12:16:56] <mids> ezakimak: db.system.js.save({ '_id': func_name, 'value': code, })
[12:18:37] <ezakimak> code being a string containing what? eg "function(<parmlist>) { <body> }", right?
[12:18:51] <ezakimak> or omit "function" ?
[12:19:02] <ezakimak> or just the <body>?
[12:19:48] <mids> http://api.mongodb.org/python/current/api/bson/code.html
[12:20:44] <ezakimak> has to be a code object? can't just be a string?
[12:23:42] <mids> ezakimak: javascript code is a specific bson type
[12:23:51] <mids> but try using a string and see if it works
[13:29:20] <brahman> Hi, has anybody seen what appears to be an issue with the connection pool having stale connections. We are using version 2.0.3 in a sharded environment (aiming to upgrade) and every now and again we are getting no documents being returned but we are certain the documents exist. after restarting mongos the issue resolves itself.
[13:30:15] <brahman> I was thinking of issueing a db.flushrouterconfig to see i
[13:30:25] <brahman> f it resolves the incident.
[13:30:44] <brahman> any insight into this kind of problem, is much appreciated.
[14:11:08] <rydgel> Does cloneCollection() works with sharding and mongos. Can it be run inside when connected to a mongos? I've got weird assert errors.
[14:11:53] <rydgel> like this: http://pastebin.de/29666
[14:12:05] <rydgel> I've got Mongo 2.2.0
[14:14:14] <augustl> how do I batch update a bunch of docs?
[14:21:44] <NodeX> august1 : update the same key in each records?
[14:22:27] <ezakimak> augustl, update with multi = true
[14:56:35] <Lujeni> Hi - the best order for shutdown properly an "shard" : mongoS , then mongoRS ( node , then arbiter ), then Config server ? thx
[14:56:37] <kanzie> Im trying to add a property to an existing collection using the inc-operator. If the field don't exist since before, will this be a problem?
[14:57:44] <kanzie> like I have users-collection with 100 users, but no one has the property age… now I want to add it if it doesn't exist (with value 1) or increment it with 1 if it does exist
[14:58:42] <NodeX> it will increment it if not exists
[14:59:55] <NodeX> db.foo.update({foo:1234},{$in:{field:1}},false,true); will add "field" = 1 if not exists or increment it by 1 if it does
[15:33:51] <Truquero> Hello there
[15:34:57] <Truquero> suddelny mongodb is having problems i cant start it and when i try to connect to it through an application i get this error: Could not connect to a primary node for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>
[15:35:06] <Truquero> any help on this i am lost T_T
[15:35:31] <Truquero> i uninstalled an reinstalled and its the same
[15:38:14] <ppetermann> Truquero: what error does it give you when starting?
[15:48:10] <VinX> Hello all,
[15:51:45] <idefine> yo
[15:51:54] <idefine> oops
[15:54:57] <VinX> I would like to wrap mongo DB server in c++. I mean try to use it as "memory managment".. dunno if my will is clear.. :P
[15:55:05] <Venemo> hi
[15:55:30] <Venemo> could someone please tell me what's the mongo alternative of an SQL varbinary or image column?
[15:59:06] <Vile1> Venemo: array of bytes
[15:59:42] <Venemo> Vile1, I see. but isn't there a limit on the max size of a BSON document?
[16:00:11] <Vile1> 16 MB limit on size for the document in Mongo
[16:00:28] <Venemo> so how would I go about storing binaries larger than 16 MB?
[16:00:35] <Vile1> if you want something of unkonown size - use gridFS
[16:00:43] <Venemo> mhm
[16:01:25] <Venemo> Vile1, so, I should use GridFS and my documents should reference a file from GridFS?
[16:01:27] <NodeX> GridFS is the preffered way of storing large / any files safely in mongo
[16:01:43] <Venemo> thanks NodeX :)
[16:02:03] <NodeX> gridfs breaks the files into chunks so you can scale easily
[16:02:40] <Venemo> NodeX, is it possible to use gridfs with streaming?
[16:07:31] <NodeX> you can get bytes from the chunks collection if you need to
[16:07:43] <NodeX> you'll have to do the work in your app for that
[16:07:49] <Venemo> mhm
[16:08:23] <Venemo> okay, thanks :)
[16:09:17] <NodeX> https://github.com/mdirolf/nginx-gridfs <-- maybe that can help
[16:09:43] <Venemo> thank you
[16:10:34] <Venemo> my other question is, has anyone managed to get MongoDB working on ARM? I see there are some guys who claim to have done it, but I haven't found any code or guides on how to do it.
[16:12:00] <NodeX> I don't know about that sort of thing
[16:12:21] <Venemo> no problem, maybe someone does :)
[16:19:05] <algernon> Venemo: afaik, it works on armel, but the usual 32bit limitations apply
[16:19:32] <algernon> so it's not terribly useful.
[16:26:53] <Venemo> algernon, what's wrong with the 32 bit limitations?
[16:27:16] <algernon> Venemo: being limited to 2Gb of data sucks.
[16:27:26] <Venemo> algernon, ah, I see.
[16:27:53] <Venemo> algernon, well, I only intend to use this ARM device for testing, so I can live with that.
[16:28:31] <Venemo> algernon, the problem is that I didn't find any packages or build instructions. only a comment in a bug report from someone who claims he did it.
[16:29:15] <algernon> Venemo: if you're on armel, it shouldn't be *too* hard to compile it, I believe.
[16:29:50] <Venemo> algernon, to be specific, I'm talking about a raspberry pi.
[16:30:03] <Venemo> algernon, I'm currently running the default debian image on it
[16:32:53] <Venemo> I suspect it is
[16:34:38] <Venemo> actually ARM is bi-endian, but most of the time people use ARMEL
[16:34:51] <algernon> aye, just checked, raspbian is indeed little endian
[16:36:13] <algernon> do you get stuck at compiling at some point, or it compiles but doesn't work?
[16:37:05] <Venemo> I actually haven't tried. I just googled for it and the only thing found was an unresolved bug report. that's why I thought I'd ask here first :)
[16:37:52] <Venemo> whether it's supposed to work or not
[16:38:46] <Venemo> ok
[16:39:03] <Venemo> I'll give it a try :)
[16:39:05] <Venemo> thanks algernon :)
[17:03:43] <stefankoegl> I'm trying to build mongodb from git master, and get the following error: https://friendpaste.com/55MrWtpTIufnEMRrxXbNyJ what am I doing wrong?
[17:04:22] <jmar777> quick sanity check - does a TTL collection with a second index (besides the expiry value) for username/ip/other-identifier seem like a reasonable way to keep track of failed login attempts within a certain window?
[17:04:49] <algernon> Venemo: let me know how it went :)
[17:10:44] <jgornick> hey guys, in mongo 2.2, how can i convert an ObjectID to a string?
[17:15:26] <NodeX> in yuor app
[17:15:28] <NodeX> your*
[17:15:48] <jgornick> NodeX: in a map/reduce job
[17:16:12] <jgornick> I see if I do, myObjectId.toSource(), it returns an object with a str property.
[17:16:19] <jgornick> But that just seems gross.
[17:18:37] <NodeX> String() ?
[17:18:52] <NodeX> var id=new String(ObjectId);
[17:19:04] <NodeX> not sure, I can't see why it wouldn't work
[17:19:57] <xamox> Is it okay to delete all the files in /var/lib/mongo? I want a clean slate, replication and all, is it okay to blow that folder out?
[17:20:03] <jgornick> In 2.0 it was working, however, in 2.2, it doesn't seem to be converting....
[17:20:09] <jgornick> NodeX: Let me try again...
[17:24:02] <jgornick> NodeX: When I do String(some object id instance) in a map function, the typeof returns "string" and the value is a string as "ObjectId("the hex")"
[17:25:02] <jgornick> NodeX: https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/UhH3PO5VN6M
[17:27:55] <NodeX> Seems it a bug, watch the jira for an update
[17:28:11] <NodeX> to get round it in your code I would do a str.replace()
[17:28:16] <NodeX> (for a quick fix)
[17:28:52] <jgornick> NodeX: Yeah, I think the issue that was filed is wrong. They should fix the default String type conversion in 2.2 back to returning a string of the hex string.
[17:39:11] <jgornick> NodeX: I created https://jira.mongodb.org/browse/SERVER-7055
[17:55:08] <smartviking> I'm trying to add a new property to all documents, but it doesn't work:
[17:55:09] <smartviking> > db.urls.update({},{$set : {"popularity":0}},false,true)
[17:55:09] <smartviking> > db.urls.find({'popularity': { '$exists' : true }})
[17:55:19] <smartviking> What am I doing wrong?
[17:56:01] <smartviking> The second commend there returns nothing, to be clear
[17:56:09] <wladston> when I check the mongo profiler, it doesn't show info about the subset of fields I passed to my query.
[17:56:18] <wladston> as if it didn't make any difference ...
[17:56:44] <wladston> is this a problem with pymongo ? or the profiler doesn't care about the subset of queries that are requested ?
[17:57:08] <wladston> (I'm trying to optimize counting elements by only selecting the "_id" field ...
[17:59:51] <smartviking> I have a db with documents, I want to create additional functionality and need to update the old documents to hold a new value. What do I do?
[18:00:41] <smartviking> I've tried a dozen ways to add a 'popularity' field and they always fail, I feel as if some of them ought to have worked
[18:01:07] <wladston> smartviking: db.your_collection.update({$set: {'popularity': {}})
[18:03:36] <smartviking> wladston: When I run: db.urls.update({$set: {'popularity': 0}})
[18:03:46] <smartviking> wladston: I get: uncaught exception: assert failed : need an object
[18:04:38] <doubletap> smartviking: update takes at minimum two arguments, i think.
[18:04:46] <doubletap> the first is the selector and the second is the updater.
[18:04:54] <doubletap> those are my names ;)
[18:06:21] <doubletap> unless a single argument call implicitly is saying db.mycol.update({}, {$set:{the:'house on fire'}});
[18:07:56] <wladston> doubletap: is correct :)
[18:08:21] <doubletap> wladston: you just made my day :)
[18:08:32] <wladston> and don't forget multi=true
[18:08:45] <wladston> doubletap: :) can you help me with my problem ?
[18:08:58] <doubletap> i am not a doctor.
[18:09:14] <doubletap> what are your symptoms.
[18:09:16] <doubletap> ?
[18:09:24] <smartviking> Ok turns out I made a typo, and used a non-existent database, that explains a lot
[18:09:25] <wladston> I got some health issues too, but my main concern is about the code haha
[18:09:34] <doubletap> i am reading up
[18:09:44] <smartviking> db.urls.update({},{$set: {'popularity': 0}},false,true) <-worked
[18:10:07] <wladston> I'm selecting a subset of fields in my query, but the mongo profiler doesn't show this information
[18:10:19] <wladston> it just shows my plain query
[18:10:24] <doubletap> ah, wladston, i am totally unfamiliar with the profiler.
[18:10:42] <wladston> I wanted to measure if the query with the subselection is faster
[18:38:53] <cmendes0101> In the aggregation framework, im attempting to do a $group but is there a way to modify the data before the $sum? Like I'm trying to replicate a GROUP BY in SQL with it retrieving another field with a CEIL()
[18:42:35] <cmendes0101> $group : { _id: "$cust_id", count: {$sum: 1},minutes: { $sum: $length}} <- To do a CEIL on $length
[18:44:15] <Neptu> hej someone that used mongodb c++ driver when i use the .connect("localhost") do I need to add all the hosts of the replica set like I do with the python driver??
[18:52:37] <Neptu> arbiter can be used as a connection host??
[18:57:23] <_m> Ye
[18:57:28] <_m> *Yep, sure can.
[18:57:42] <_m> Neptu: We are doing that exact thing here in our Rails stack.
[18:58:27] <Neptu> I read some time when i was using the python driver that was not working so thats why im asking
[19:49:46] <BrianAnthony> hey guys. receiving the error "Can't take a write lock while out of disk space" when trying to insert a record into mongodb. the collection is brand new but it does have sharding enabled with a record inserted prior for creating the index and sharding on the appropriate keys. anything fishy here?
[19:50:39] <ron> hmm.. well... do you have enough.... disk space?
[19:52:50] <BrianAnthony> asking mis... they have assured me but i'm getting a double check here
[19:53:47] <ron> Oh, I would triple check if needed/
[19:54:11] <BrianAnthony> well lucky me i'm on the dev on the project so i get to trouble shoot without access to the box because i'm not on the networking team =p
[19:54:48] <ron> that's.. well, good luck.
[19:56:44] <BrianAnthony> well i've been googling and it's not like "oh it's just this" it's either some crazy edge case or we're out of space and i'm being told we have space...
[19:56:49] <BrianAnthony> still waiting on the answer.. i'm worried now
[19:58:36] <ron> okay, if you need to support the database, you need access to the database machine. if you don't need to support the database, then tell whoever is supposed to do it to do it.
[19:59:13] <ron> what you describe now is the best way to make problem solving take exponentially longer.
[20:13:40] <BrianAnthony> so i am being assured 100% there is available space for folders specified in the dbpath.
[20:15:28] <ron> demand to see the output of 'df' on the server.
[20:15:30] <BrianAnthony> one thing that stuck out to us from the logs was a warning saying "warning: could have auto split on collection: my_collection.collection_name but: splitVector command failed {errmsg:"ns not found", ok: 0.0}
[20:16:25] <BrianAnthony> looking at collections and sharding status the db my_collection and the collection collection_name do indeed exist
[20:17:04] <BrianAnthony> that warning had about the same mileage in google
[20:17:48] <BrianAnthony> i'm about to just tell them to rebuild the environment since it's new anyway. something is fundamentally wrong here. i won't accept hitting an extreme edge case on the first 2 records being inserted
[20:21:29] <Neptu> hej how can i do a query with between? i want to get all the documents that are between 10 and 15
[20:21:58] <ron> Neptu: I'm tempted to tell you to RTFM.
[20:22:29] <Neptu> RTFM?
[20:22:43] <Neptu> im doing that
[20:23:24] <BrianAnthony> http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart
[20:39:48] <timeturner> full text search engine recommendations?
[20:40:05] <timeturner> I looked at elasticsearch but it's written in java?
[20:40:38] <timeturner> I basically already have indexes in mongodb on what I would like to perform full text search on
[20:44:30] <_m> timeturner: We use elasticsearch and recommend it to our sister companies.
[20:45:21] <_m> You could roll your own search class if you wanted to use a purely mongo solution. We've gotten better mileage with ES than internal searching classes, so YMMV
[20:45:41] <timeturner> is it fast in your experience?
[20:45:51] <timeturner> I'm planning to use it in conjunction with node.js
[20:45:56] <timeturner> client ^
[20:46:34] <_m> Yeah, it's fast.
[20:46:53] <_m> As an aside, just because something is Java doesn't mean it's slow.
[20:47:29] <timeturner> yeah, haha. I was just worried that I would have to use a Java client as well but just found out that there is a node client
[20:47:38] <timeturner> too quick to judge :P
[20:47:50] <_m> We use it in a Rails stack. =)
[20:48:07] <_m> Admittedly, we rolled our own client gem
[20:48:43] <_m> Back to the original topic: It's fast and the api-based configuration is fantastic
[20:49:05] <timeturner> also, I've seen the term "mongodb river" thrown around a lot with elasticsearch
[20:49:10] <timeturner> what does a river do?
[20:49:12] <_m> Much less headache than solr with rabbitmq, etc.
[20:49:35] <timeturner> yeah I was looking at solr too, but too much config for what I need right now
[20:49:50] <_m> https://github.com/richardwilly98/elasticsearch-river-mongodb
[20:50:25] <_m> Pretty sure it refers to that (or something like it). Which would be an interface plugin. We don't use it here, so that's about all I can offer,
[20:51:44] <timeturner> so just to ensure I'm thinking about this correctly, elasticsearch will basically hold a duplicate of the indexes that I want to search on from mongodb correct?
[20:52:06] <_m> Essentially, yeah.
[20:52:12] <timeturner> and then it uses it's algorithms to figure out which entries from the index to return based on the query I give it from the client
[20:52:29] <_m> Correct. Weighting of the indexes is configurable
[20:52:40] <timeturner> cool
[20:52:49] <_m> And one can use various transformations to determine how those weights are used.
[20:52:59] <_m> IE: normalized_ngram, ngram, etc.
[20:53:29] <timeturner> right
[20:53:43] <timeturner> and how do you maintain sync between mongodb and elasticsearch?
[20:54:03] <_m> Our ES client updates the index when records are updated.
[20:54:27] <timeturner> cool
[20:55:32] <_m> Obviously you would need to ensure/implement that functionality; not sure how other clients handle it.
[21:10:09] <jergason> Hello friends.
[21:10:42] <jergason> How can I have a compound unique constraint in mongodb? Does that question even make sense?
[21:17:16] <jergason> So I want to ensure that two properties together are unique, not just one
[21:18:20] <timeturner> compound unique index
[21:42:42] <Neptu> hej have a problem, im using the primary host of my replica set and if i give the driver " replica_ip, master_ip" does not do the reading, is this normal?
[21:43:05] <Neptu> should i define in order "master_ip , replica_ip" for the c++ driver i mean
[21:47:28] <pejoculant> Hi if I lose all of my config servers in a sharded set up and chunks have migrated since my last backup, am I screwed?
[21:47:46] <pejoculant> that is, do I have to do a full restore?
[23:45:57] <tomlikestorock> what's the best way to go from a MongoDate to a DateTime object in PHP?