PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 25th of January, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:40:24] <capleton> hey, i've got kind of a best-practices quesion
[00:42:04] <capleton> I'm thinking about keeping track of dates&times when a document is modified... what's the best way to do this? Should i have an empty string in the document and just append "Date" whenever the document is modified?
[02:32:35] <xcesariox> can someone help me out with mongoid:config ? Could not find generator 'mongoid:config'. Maybe you meant 'migration' or 'controller' or 'generator' https://gist.github.com/shaunstanislaus/7ca39d7430e8478ea50d
[02:33:48] <xcesariox> joannac, krisfremen can you help me out?
[03:07:35] <krisfremen> xcesariox: what project is this error coming from?
[03:07:56] <krisfremen> ah, seems mongoid
[03:08:11] <krisfremen> I've mostly used mongo in python, haven't touched mongo from ruby
[03:10:27] <xcesariox> krisfremen: ruby rails
[07:25:03] <diimdeep> Hello, Events, each with timestamp, events not many, but i want to group them by weeks across 50 years, implementation suggestions ?
[09:18:07] <salty-horse> Hey. I upgraded from 2.4 to 2.6, and I'm noticing a lot of page faults. trying to investigate, one of the things that bothers me is that queries such as "db.collection.find({_id:/^1/}, {_id: 1}).explain()" show "indexOnly: false" when it was "true" in 2.4. Is this a documented change?
[11:14:38] <tbo_> noob question, what's the recommended way of adding full search to a model in mongodb?, I'm using node and mongoose. I'm leaning to elasticsearch but looks overkill?
[11:37:01] <kali> tbo_: if you find ES overkill (and you might be right, it depends on your requirements) you should have a look at the built-in text search features
[11:37:14] <kali> tbo_: http://docs.mongodb.org/manual/core/index-text/
[11:38:01] <tbo_> @kali thanks, I'll take a look at this, will this give me similar functionality?
[11:38:36] <kali> not as extensive at ES, no
[11:38:43] <kali> s/at/as/
[11:39:33] <tbo_> ok cool, are any of the mongoose plugins worth looking at? they seem to not be maintained
[11:39:43] <kali> no idea
[13:57:44] <mephju> I am sure this might have been asked a few times in here but I can't find good results for my question on google. Is it advisable to use the aggregation pipeline framework for queries which might by triggered by a large user base such as in web app?
[13:58:09] <mephju> Or is this a sign that I should probably use another db system
[13:58:57] <kali> mephju: if you're aggregating over huge quantities of data, then yes, you're in trouble
[13:59:29] <kali> mephju: but if your pipeline starts with a selective and indexable $match, it can be manageable
[14:00:12] <mephju> kali, thx. I guessed that. So you aren't telling me to strictly stay away from this. That's good.
[14:01:04] <mephju> I use the aggregation pipeline mostly when I want to limit the number of subdocuments in an array
[14:01:52] <mephju> normal queries always return the document with the whole array, which i find strange, honestly
[14:02:19] <kali> have you consider $slice in find projection ?
[14:02:27] <mephju> and the $ operator only gives me the first doc in that array
[14:02:39] <mephju> no, I never even heard of it
[14:02:45] <mephju> let me check it out
[14:02:52] <kali> mephju: http://docs.mongodb.org/manual/reference/operator/projection/slice/
[14:04:24] <mephju> kali, this doesn't seem to do the trick. I want to return all subdocs which match the query.
[14:04:51] <kali> ok
[14:05:46] <mephju> basically what I need is something like $ operator which returns not only the first matching subdoc but all matching subdocs.
[14:08:42] <kali> yeah, pipeline it is.
[14:16:46] <mephju> kali, ok, thank youi very much
[14:38:49] <hmsimha> hey, is textual search on a field with a regex a relatively costly operation?
[14:41:01] <hmsimha> and if we're matching from the beginning (as in, if the user types "test" then they only receive results that start with "test" instead of results that contain "test"), does that make the performance more similar to a numeric comparison, assuming the string type field is indexed?
[15:00:07] <kali> hmsimha: yes to both
[15:01:24] <hmsimha> thanks kali! This is probably the 10th time you've answered a question of mine on Freenode. I really appreciate all the help you dish out here
[15:03:24] <kali> you're welome :)
[15:11:06] <tbo_> can't figure out how to populate related fields pre save? looked at a bunch of examples on SO
[16:24:51] <t0th_-_> hi
[16:25:06] <t0th_-_> what is the difference between mongod and mongodb in lunux?
[16:25:31] <kali> mongodb is a commercial name
[16:25:46] <kali> mongod is the main server executable/process name
[16:26:39] <t0th_-_> but i have both in my rcconf
[16:27:47] <kali> i have no idea what rcconf is
[16:49:25] <annoymouse> Hi
[16:50:20] <annoymouse> I'm making a CMS. My question is, should the user object hold an array of blogs they own, or should the blog object hold a list of users that can edit it?
[18:58:56] <tbo_> anyway to populate referenced items in a schema on save?
[19:10:35] <hmsimha> If a result set of, say, 500 items (specific to a user) needs to be paginated and sorted, from the server's perspective would it make more sense to return that full set and let the client-side handle pagination/filtering/sorting/etc, or to do another query, limit, sort every time a user would want to go to the next page, filter, or sort by a different field (some of which may not be indexed)?
[20:33:58] <morenoh149> [diecast]: foo
[20:34:16] <morenoh149> dimon222: there no such next method right?
[20:34:34] <morenoh149> anyone have experience with the nodejs driver? http://stackoverflow.com/questions/28121668/cursor-has-no-method-next?noredirect=1#comment44621608_28121668
[20:59:22] <krisfremen> hmsimha: you can always cache the full set if it's not bigger than x results and do ops on the cached results until they are in bounds
[21:01:06] <krisfremen> hmsimha: I usually do this when there's not enough ram on the mongo box to handle everything in ram, which isn't very often
[21:09:04] <morenoh149> [diecast]: 7
[21:37:46] <mango_> oplog timestamp, is this the same format to use for mongorestore --oplogLimit?
[22:01:00] <jayjo> Is there a way to make a query that is case-insensitive without using regex? Or is that the only way?
[22:02:23] <kexmex> can mongos be used to talk to a ReplicaSet/
[22:02:25] <kexmex> ?
[22:02:40] <kexmex> or say, all 3 servers of ReplicaSet need to be provided to the driver?
[22:03:53] <cheeser> the host given to the driver is a seed. once connected, the driver determines the topology of the cluster and communications accordingly
[22:04:39] <kexmex> what if the primary is down tho
[22:04:47] <kexmex> at the time the driver comes up? :)
[22:05:24] <cheeser> if there's no primary, you'll get errors unless you specify secondary reads are ok.
[22:05:27] <cheeser> writes will all fali.
[22:05:28] <cheeser> fail
[22:05:38] <kexmex> ui mean
[22:05:45] <kexmex> if i specify only one server in connection string
[22:05:54] <kexmex> if that server is down, how's the driver gonna know about the others lol
[22:06:09] <cheeser> if that host is down, you won't connect. that's why you should specify multiple members.
[22:06:33] <kexmex> thats what i said no?
[22:06:33] <kexmex> :)
[22:06:39] <kexmex> [00:00:31] <kexmex> or say, all 3 servers of ReplicaSet need to be provided to the driver?
[22:06:46] <kexmex> but like
[22:06:49] <kexmex> you are saying
[22:06:55] <kexmex> driver tries to connect to at least one to get all the RS info?
[22:10:36] <cheeser> correct. the driver will try each host provided in the seed list.
[22:10:46] <cheeser> if they're all down, you've got big problems
[22:15:45] <kexmex> cheeser: kewl kewl
[22:34:51] <jayjo> I want to perform a case-insensitive query on the db but not search the string for the component but match the whole string. In the mongo reference it states db.products.find( { sku: {$regex: /^ABC/i } } ), which returns any document with abc in sku, including abc123, aBc238, etc. Can I only search for the exact string, case insensitive?
[22:36:52] <kexmex> put
[22:36:54] <kexmex> $
[22:36:56] <kexmex> at the end of string
[22:36:59] <kexmex> ^ABC$
[22:37:01] <kexmex> i believe
[22:38:50] <jayjo> kexmex: thanks, that's a bingo
[22:39:03] <kexmex> bada bing
[22:39:03] <kexmex> :)
[22:41:05] <christo_m> http://pastie.org/9860268# any reason when i fetch an item with mongoose the id is not a string
[22:41:20] <christo_m> its making merging the updated invoice difficult because the _id is a string when it comes in as a request
[22:43:36] <christo_m> doing something like http://pastie.org/9860299
[23:51:50] <RaceCondition> is there a way to combine tailable/awaitdata and findAndModify?
[23:52:49] <RaceCondition> 1) findAndModify at least waits if nothing is found or even 2) produces a stream of documents (which are also modified)
[23:54:32] <RaceCondition> oh: https://jira.mongodb.org/browse/SERVER-11753