[04:12:49] <duncan_donuts> I have read the docs and tried multiple things and can't figure this out… hoping someone here can give me a quick pointer….
[04:13:50] <duncan_donuts> .. if I have an ObjectId from collection A, and I want to find documents in collection B which contain the ObjectId in a list field.. what is the query syntax?
[07:27:03] <augustl> what's a good way to find the position in a collection of a single record by Object ID when sorting by a specific attribute?
[07:32:54] <augustl> only way I can think of is to actually fetch all records and find the positin manually in memory
[09:07:28] <gigo1980> hi where can i set the size of the oplog for an new shard ?
[09:43:16] <Rozza> gigo1980: there is an oplogSize arg for mongod
[09:43:45] <Rozza> the docs about sizing are here: http://docs.mongodb.org/manual/core/replication/#replica-set-oplog-sizing including a link to how to resize the oplog if needed
[10:14:47] <Bastian_B> Hello, I am using python 2.7, each time I try to import pymongo I got an error: 'from bson.errors import * ImportError: No module named errors'. Versions: pymongo==2.0.1, mongokit lastest, any idea?
[12:20:55] <Vile> I need to be able to calculate averages for fixed periods of time
[12:21:11] <Vile> In case of the example above - per minute.
[12:22:17] <Vile> Bu in order to calculate average for interval [00:01:00, 00:02:00) I need to know one value outside of that interval
[12:22:31] <Vile> in this case it would be 00:00:55
[12:23:32] <Vile> Question is - how can I do that?
[12:30:40] <Vile> at the moment I'm doing findOne( ) within the map() function. I would prefer to avoid any sub-queries or do them in finalize at least
[12:59:44] <Derick> mongodb could do with some better date/time handling. But then again, I might be a bit biased.
[13:00:25] <Lujeni> Hello - I try to choosing my Shard Key. I only use month field (ISODATE) for all query. month field + _id field seems good choice ? Thx
[13:02:13] <NodeX> Vile, I would suggest you do what I do when I need to aggregate on time ranges
[13:26:39] <NodeX> "Use $project to quickly select the fields that you want to include or exclude from the response. Consider the following aggregation framework operation."
[13:28:50] <NodeX> then why are you still trying the same solutions?
[13:29:15] <Vile> no. i'm trying to figure out better one.
[13:29:36] <NodeX> which I am offering but your schema will have to change
[13:29:53] <NodeX> or you will have to do it in 2 operations
[13:30:34] <Vile> NodeX: schema change is fine. but what you suggesting is actually external application. because aggregation does not have persistence
[13:31:01] <NodeX> no but your app does have persistence
[13:32:15] <Vile> NodeX: at the moment all teh aggregations are done on DB level. app just uses them
[13:32:46] <Vile> i have number of intermediate collections with pre-aggregated values
[13:32:57] <NodeX> which is the correct way to do it
[13:33:06] <Vile> what i'm trying to figure out - the most effective way to build those
[13:33:33] <Vile> incrementally, in parallel, etc, etc
[13:34:52] <Vile> i.e. => get rid of "find" inside of aggregation procedure or at least reduce number of those.
[13:35:34] <Vile> actually i've just thought of one idea. i need to store previous value together with current value in the same document
[13:35:53] <Vile> of course it would cause data duplication
[13:36:09] <Vile> but should be much better performance-wise
[13:37:12] <Vile> then, on the next step i should be able to build pre-aggregated collections using this pre-recorded "previous" value
[13:40:57] <Vile> really, aggregation framework output as a source for reduce procedure would be nice :)
[13:42:54] <NodeX> I do somehting similar, every 5 minutes I grab the latest data for today and process it
[13:43:43] <NodeX> I upsert my aggregates for later aggregation and plsit them into minutes from days, I get good performance and a semi realtime feel to it
[14:01:26] <Vile> Would like to switch to sharding, but unless I get rid of "find" inside the map() function, it will not offer any additional benefit
[14:04:27] <dominikzogg> jmikola. Can you link me an example how to use the querybuilder with reference many document? http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/query-builder-api.html
[14:07:36] <jmikola> http://www.doctrine-project.org/api/mongodb_odm/1.0/class-Doctrine.ODM.MongoDB.Query.Expr.html#_includesReferenceTo is the only relevant method afaik; also, this channel really isn't the place for such questions. #doctrine would be more appropriate.
[14:36:56] <sirious> trying to work on my .mongorc.js
[15:26:44] <Nopik> hi all.. i have some race condition in my app, i'd like to know what is the best way to solve it. Lets say we have User documents, each user has unique name property. So, in my code I have something like register_user( name ), which need to create new User document with given name, but only if name is not taken yet. Of course calling User.find({name:name}) and calling User.save() after getting 0 documents from find() is *bad*. How that
[16:11:12] <Almindor> how do you do "array in array" query?
[16:11:36] <VultureZ> http://www.pastebin.ca/2202902 trying to create a document with sub-documents that have a unique index field that is being enforced even though no sub-document entries are added.
[16:11:52] <VultureZ> Any ideas on how to resolve this?
[16:11:56] <Almindor> say documents have an array field and you're looking for "any of [1,2,3,4]" inside of them (so it matches all documents which have any of those 4 inside their arrays)
[16:12:41] <VultureZ> Almindor,can't you use a regex query to look for any of those values within that array?
[16:13:19] <Almindor> VultureZ: it's numbers and non-continuous
[16:16:20] <VultureZ> If you have a sub-document and you have a field that is unique and required, if you create the parent document without any of the subs, how can you prevent the sub's unique field from being enforced?
[16:17:39] <NodeX> if your unique index requires it
[16:21:43] <ppetermann> VultureZ: maybe the term subdocument is misleading you there, its not really a document stored in a document, its sort of part of the document
[16:41:33] <jmpf> http://pastie.org/private/5tsydgxkf2y9zmd03okb1q <--am I doing something wrong here? this takes forever to run - on mysql it runs in less than 80ms on a 100k row set - indices are present on created_at
[17:51:05] <Gargoyle> Is it possible to rename a database?
[17:52:50] <sqwishy> Where do I go to complain about bugs in the mongo-pyton-driver project?
[18:24:22] <toddnine> Hi guys! Dumb question, but… Is there a quick way using the Java driver to find a document by it's "_id" or do I need to use the query syntax?
[18:29:00] <jmpf> trying to group rows by day of year - http://pastie.org/private/tjrk8snurcqh8ssupzb9qq - what's wrong w/this aggregate query?
[18:38:23] <skot> toddnine: you need to use the query syntax.
[20:21:36] <Spaceghostc2c> Is there a preferred way to use multiple reducers in the mongodb community, or is it safe to assume I'm the local expert for my own problem?
[20:36:08] <sysdef> hello. i read there is no version for android. there is (still) no version?
[21:07:29] <ribo> is there any way to have mongos route database reads to a specific replica set? and writes to another?
[21:07:47] <ribo> e.g. writes to the primary, reads to secondary?
[21:18:51] <camonz> is there a way to apply a new reduce to a field in a collection that's the result of a map/reduce ?
[21:26:33] <AlessandroD> Hello channel! I am new to MongoDB and I'd like to know what is the recommendation on using the Mongo-generated __id as a public external identifier in my application's object model. Is that somehow discouraged? Is there somewhere with information about it? Thank you in advance!
[21:27:36] <ron> I don't see a problem with it. Foursqaure uses it that way.
[21:31:51] <AlessandroD> hmm, is that so? interesting
[21:35:11] <crudson> http://www.mongodb.org/display/DOCS/Object+IDs for general info re. _id and ObjectID. Make yourself aware of what the generated id represents and decide if you're happy using it that way.
[22:58:59] <sqwishy> Is there a way to submit bug reports without creating an account on the jira thingy?