[01:20:28] <fructose_> I'm looking to have a field that keeps a count of items, ideally so I can write a query with an array of those items and the count will increment. Can I do that in a single update?
[01:23:43] <markizano> When mms does backups, is there any component run externally from the server running the mms agent (e.g. from mms.mongodb.org?)
[01:24:02] <fructose_> e.g. if I run an update with {id: myId} and (somehow) items: ["apple", "banana"], it will store "apple": 1, "banana": 1. Then if I did it again with just ["apple", "carrot"], it'd end up storing "apple": 2, "banana": 1, "carrot": 1
[01:24:09] <markizano> we are trying to do a rs backup, and it's unable to connect, curious if the target's DNS is resolved ...
[01:25:17] <joannac> markizano: open a MMSSUPPORT ticket
[01:30:16] <fructose_> joannac: I need it to be a field of that document. So would it be update({}, {$inc: {items.apple:1, items.banana:1}) ?
[01:33:44] <joannac> fructose_: then your example is wrong. what do you actually want the target document to look like?
[01:34:53] <joannac> fructose_: you said "it'd end up storing "apple": 2, "banana": 1, "carrot": 1" but what do you actually want? {items: {"apple": 2, "banana": 1, "carrot": 1}} ?
[01:35:43] <joannac> sorry, to make it more clear, {_id:1, items: {"apple": 2, "banana": 1, "carrot": 1}} ?
[01:35:58] <fructose_> joannac: Right, it could have been more clear. Doesn't make it wrong
[01:36:01] <claytonzaugg> Any MeteorJS users out there? If I have an order form and I need the order number to automatically increment each new order created, how can I do that?
[01:37:35] <fructose_> joannac: But it's working, thanks
[01:38:25] <claytonzaugg> joannac, are you familiar with MeteorJS by chance and its use of Mongo?
[01:48:14] <claytonzaugg> Thanks for at least responding joannac
[01:52:27] <claytonzaugg> Any MeteorJS users out there? If I have an order form and I need the order number to automatically increment each new order created, how can I do that?
[02:28:24] <iio7> I have just done some testing with mongodb, disabled the daemon and then enabled it again, but now it wont start: http://pastebin.com/ux4wdjCA
[02:49:28] <iio7> Giving up, impossible to find any information on what is going on.
[03:28:57] <rjurney> I need to look at records in the links collection that have values other than ‘partnership’ and ‘customer’. How do I do that? This isn’t working: db.links.find( { $or: [ { type: {$ne: 'partnership' } }, { type: {$ne: 'customer'} } ] } )
[03:59:26] <rjurney> @Boomtime: thanks, that is better
[04:03:17] <Boomtime> for your case it's probably the same, though be aware that if $type is an array, $nin and $not:$in will produce different outcomes
[04:10:07] <Bioblazin> the Schema Reflects a Product API Key Storage, associated with a Person who created it.
[04:10:40] <Bioblazin> :x Is it better to generate a Associtive GUID? Or use the _id of the Entry for Searching?
[04:24:31] <Bioblaze> Anyone want to have a Discussion about Data Modelling?
[09:54:15] <Creeves> hey guys, I'm getting error code 17406 (getMore executor error due to trying to sort in ram and running out of space) and read online that puttin an index on the field sorted by should fix it
[09:55:16] <Creeves> i've tried that, but am still getting the error (http://pastebin.com/4c3kg4as)
[10:59:59] <cheeser> Creeves: aggregation or query?
[11:09:25] <Creeves> cheeser: it was a .find({_id: {$in: some_array}).sort({some_field: 1}) query, and i put an index on some_field but it still gave that error
[11:47:37] <amitprakash> Hi, I am using mongodb to insert records from collection A to collection B as db.A.find(filters).sort({_id: -1}).forEach(function(row) { db.B.insert(row); });
[11:48:00] <amitprakash> However, db.B.find().count() returns a single record ( when the insert has been going on for a while.. what gives?
[14:22:25] <deathanchor> how can I hint an update?
[14:22:33] <deathanchor> do I have to use $hint : {}?
[14:27:07] <deathanchor> hmm.. appears no way: https://jira.mongodb.org/browse/SERVER-1599
[14:34:38] <amitprakash> Why does pymongo keep throwing a pymongo.errors.ServerSelectionTimeoutError: No replica set members match selector "<function any_server_selector at 0x7f5a6c05f378>"
[14:35:06] <amitprakash> This is on pymongo 3.0.3 and happens at random
[17:05:09] <parshap> How do you get the _id of a newly inserted document when using the node.js mongodb-core driver? The documentation doesn't mention anything and the result object doesn't seem to have an _id in it. http://mongodb.github.io/node-mongodb-native/core/api/Server.html#insert
[17:18:01] <StephenLynx> The MongoDB driver is the high level part of the 2.0 or higher MongoDB driver and is meant for end users.
[17:18:35] <StephenLynx> https://www.npmjs.com/package/mongodb-core: Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications
[19:37:21] <StephenLynx> yeah, I'm addicted to arguing or something.
[19:37:27] <Bioblaze> I recently just began working with Data Modeling, I come from a Mysql/Spreedsheet style background.
[19:37:40] <Bioblaze> Oh seems me and you will have a great friendship. LoLz
[19:38:36] <Bioblaze> When it comes with Data Modeling, its obviously diffrent from Standardized Data Association much like Table Association in Mysql.
[19:38:58] <Bioblaze> Whats the most Optimal Way to Handle Data? Should it be stored in the Data Structure of the Data Model?
[19:39:06] <Bioblaze> Or should it be stored in a Seperate Schema and Referenced?
[19:39:43] <cheeser> Lots of Randomly Capitalized words Make me Think I'm missing Something.
[19:39:52] <StephenLynx> I heard from an experienced dev that using multiple databases at the same time doesn't perform well. as in, multiple databases connected running under the same server.
[19:40:02] <Bioblaze> eh its a Issue I have :X Mentally dont mind my cap. words.
[19:40:36] <Bioblaze> I`m running 1 Database, but Several Data Schema
[19:40:51] <StephenLynx> by schema you mean a collection or a db?
[19:43:51] <StephenLynx> I strongly suggest you don't use mongoose.
[19:44:02] <StephenLynx> not only it is extremely slow, but it doesn't have a standard behavior.
[19:44:06] <Bioblaze> Its a Product Handler for Virtual World Products. Storing the Associated Creator, and then Security Tokens for Inquires too the Server.
[19:48:50] <StephenLynx> not to mention that mongoose uses a misguided OOP philosophy.
[19:49:26] <StephenLynx> which increases RAM consumption, since every object now packs much more than just it's data and is not how application code is meant to be used in js.
[19:49:38] <StephenLynx> but I confess I am not 100% on that.
[19:54:13] <StephenLynx> if you have to perform complex updates and projections, embedding will put some limitations on you and the code will be more complex regardless.
[19:54:22] <StephenLynx> not to mention that documents are hard-caped at 16mb in size.
[20:03:18] <Bioblaze> ;-; yeas of IRC hve made me timid ;-; to kicks..
[20:04:29] <Bioblaze> So far I have about 3-5 Collections, Product, Avatar, Region, Parcel, and Traffic.
[20:04:43] <Bioblaze> Product contains information about things created by Avatar, for Security keys.
[20:05:11] <Bioblaze> Parcel is Associated to Region, and then Region is Associated in Traffic, along with Avatar associating the Avatars who have Visited.
[20:05:47] <Bioblaze> Avatar, Region, Parcel are all Found at Randomly, and then Sent to the Associated Collection.
[20:06:30] <Bioblaze> Looking at about hmm. 500-1000 calls to the Database in total per half day between all the systems.
[20:07:03] <Bioblaze> What i`m having issues with. Is my Associative thinking too Mysql, and using that in Mongodb which is obviously wrong in its attempt.
[20:07:32] <Bioblaze> So i`m looking to learn Proper Structure of a Collection, or the theory of a Proper Developed Collection structure so I can work on mine oh. Lulz.
[20:08:28] <StephenLynx> this is not a dev channel :v
[20:08:46] <Bioblaze> o.o idk. Feels like one. Lulz.
[20:08:46] <StephenLynx> i have never seen mongodb development discussion here.
[20:11:00] <StephenLynx> another detail about nested documents: if you ever find a situation where you don't want to restrict yourself for a single parent object, it will be harder to query and more expensive.
[20:11:14] <Bioblaze> But yea. I`m trien to figure out the proper development of these collections as of right now XD
[20:12:00] <Bioblaze> can you break that statement down alittle more for me StephenLynx
[20:12:18] <StephenLynx> on lynxchan, I have something called overboard.
[20:14:28] <Bioblaze> So From what I`m getting right now.
[20:14:56] <Bioblaze> ProductSchema should prolly be inside of Avatar, and Parcel should be inside of Region, then I simply Associate Region to Traffic. o.o
[20:15:08] <Bioblaze> I see what your getting at in terms of aggregating.
[20:15:16] <Bioblaze> Only viewable information is simply traffic really.
[20:15:22] <Bioblaze> Everything else is being pushed into the database
[20:15:36] <Bioblaze> only queried entries for viewing are Traffic. and Checking of the Product Key.
[20:15:40] <Derick> Bioblaze: you need to think not how to structure your data, but how your application uses and interacts with data - then according to *that*, you will find out what your schema should be
[20:17:31] <StephenLynx> the most important thing is efficiency.
[20:17:33] <Bioblaze> Well Currently, there is only 1 Check preformed for the Security, then a Token is exchanged, then everything else from there is pushing the Current Location to the Server for Traffic nothing else actually.
[20:24:16] <Dizzle> This is probably a dumb question, but in the latest version of Motor, do you even need to install tornado if you intend to use asyncio?
[20:25:22] <StephenLynx> i suggest you ask in a place dedicated to motor.
[20:26:02] <Dizzle> Is there such a place? It's a mongodb project.
[20:31:39] <Bioblaze> StephenLynx if I do a Parcels: { Name: String, Desc: String } it will create a Id inside of the Collection and inside of the Parcels Array Correct?
[20:31:53] <Bioblaze> Or do I have to specificly say _id: etc
[22:23:48] <rangergord> Hi. I'm looking at running Mongo on an ARM embedded device (relatively beefy, 800MHz and 512MB RAM). The page http://docs.mongodb.org/manual/administration/production-notes/ seems to strongly indicate you need ext4 or XFS as a filesystem. What issues can I expect to have if I try to run it on a jffs2 filesystem?
[22:24:56] <rangergord> the page also recommends Linux 2.6.36 or later. My system is at 2.6.35, what unpleasantness can I look forward to?
[22:34:32] <happyken> rangergord It just means they haven't tested jffs2 file system. They did tested ext3 and ext3 doesn't have fsallocate system call. It has to do padding to allocate space which might take couple of seconds. So they don't recommend ext3. So jffs2 file system might work fine for you.
[22:36:03] <happyken> rangergord It should work for you even with old kernel but might have performance impact. You can try and post your results for the community.
[22:36:21] <happyken> I have mongo db with multiple databases having common prefix. I want to have common account credentials for dbs having common prefix. Is this use case possible by any chance ?
[22:54:46] <inorganik> I want to store a collection of podcast episodes, but within that user interactions with episodes... so I envision an episodes collection with array of users
[22:55:07] <inorganik> but within each user an array of interactions - mostly comments
[22:55:19] <inorganik> this means arrays within arrays, i'm not sure its the best way
[22:55:48] <steffan> It's not necessarily a bad design, but it would depend on how large you expect the arrays to get
[22:56:20] <steffan> Also whether you're using MMapV1 vs. WiredTiger
[22:56:28] <inorganik> I'm having trouble writing a query to upsert a user interaction
[22:56:41] <inorganik> don't know what you mean by mmapvi vs wiredtiger
[22:56:56] <inorganik> i'm using compose.io for mongo hosting
[22:58:19] <steffan> Okay. So you're using the MMapV1 storage engine. MongoDB will have to move documents once they grow past their allocation, which will affect performance slightly.
[22:58:33] <steffan> What problems are you having writing the query?
[22:59:23] <inorganik> so, for instance a new comment by a new user... is it possible to write an upsert
[23:00:31] <inorganik> i've found you can't do $addToSet within an $addToSet
[23:00:55] <inorganik> but i don't want to add a dupe user - all interactions by that user should be under that user
[23:03:09] <steffan> Could you do that as two separate operations? The creation of a new user should happen much less frequently than creation of an interaction
[23:06:30] <steffan> Do the users have a relationship with the episodes themselves, or only if they create comments / interactions?
[23:07:03] <steffan> If that is the case, then it probably supports moving user metadata to its own collection and storing an array of comments+user display names with the episode
[23:09:26] <inorganik> yea, i'm think of the latter
[23:09:38] <inorganik> i'm writing some queries to give you an idea
[23:26:15] <meye1677> I have been getting gpg errors when installing mongodb-org on ubuntu trusty running the commands in the docs http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
[23:27:51] <meye1677> I’ve had those commands in a script and successfully install every day with the same script—I started getting the gpg errors today.
[23:39:01] <steffan> inorganik: Yes, that approach could work
[23:44:33] <Bioblaze> Should I store Ownership of a Product within the Products Schema?? Or within the Account Schema?
[23:45:29] <Bioblaze> Like Product.Accounts or Account.Products?
[23:45:43] <Bioblaze> or should I store Association between both?
[23:53:59] <steffan> Bioblaze: Consider the relative quantities. What are the numbers of products & accounts?
[23:54:50] <Bioblaze> umm Products could be maybe few 100 per Account, but could be 1000s of Owners per Product.
[23:56:25] <Bioblaze> right now the Accounts Table consists of Name, broken down virtually into First/Last and a UUID along with a creation date. So almost no information.
[23:57:31] <Bioblaze> Prolly should just store the information in the Accounts for the Products they own. Since the 16mb limit
[23:59:10] <steffan> Yes, 100 products isn't a big deal to store in an account