PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 29th of May, 2017

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:42:58] <mikea> how do I query with $elemMatch finding values for any key
[02:42:59] <mikea> like
[02:43:49] <mikea> my document is like { hwaddrs: { "eth0": "foo", "eth1": "bar" }}
[02:44:24] <mikea> and I just want to return documents that have a X value in any key under hwaddrs
[02:50:01] <mikea> anyone?
[02:51:11] <joannac> You need to know what your keys are. Sounds like they should either be values, or you should have an array of values
[02:51:15] <mikea> The couchbase query I'm trying to replicate is "select foo from bar where any obj in object_values(inventory.hwaddr_interfaces) satisfies obj == stuff end"
[02:51:17] <joannac> (and ignore the keys)
[02:51:38] <mikea> the problem is the keys are the interface names
[02:51:43] <mikea> and the values are the mac addresses
[02:52:16] <mikea> and I'm trying to select a system by mac address, regardless of which interface the address is actually on
[02:56:21] <mikea> https://jira.mongodb.org/browse/SERVER-267
[02:56:28] <mikea> looks like it might not be possible
[03:03:58] <mikea> db.systems.find({ hwaddr_interfaces: { $any: { $eq: "02:42:ac:12:00:04" } } })
[03:04:05] <mikea> that's what I'm looking for
[03:27:02] <mikea> is there any way I can use javascript to do this inside the db?
[03:43:09] <mikea> ended up fixing it by storing the hwaddrs as a list
[03:43:11] <mikea> if inventory['grains']['hwaddr_interfaces']:
[03:43:11] <mikea> inventory['grains']['hwaddrs'] = inventory['grains']['hwaddr_interfaces'].values()
[12:23:57] <kvsn> Hi guys, I'm connecting to a mongo cluster with pymongo via an ssh tunnel. Now, during setup of the connection, the host discovery mechanism does not take the tunnel into account, it tries to connect directly to the machines which fails. Any hints on how to solve this properly? Is there a way to disable the host discovery mechanism?
[12:26:53] <kvsn> I only have the problem when I connect to a cluster, a single machine in the mongourl won't trigger the discovery. However, I'd like to be able to do writes as well, and since it's a clustered setup I'd have to connect to the primary, which can change after a while.
[13:05:30] <freefrags> Hi all could someone please point me in the right direction im trying to create a view with the C# driver but i cant figure out how. anyone have a simple example?
[13:06:13] <freefrags> i wanted to add a simple lookup and create a new view
[14:35:41] <jeffreylevesque_> is there anything bad with - https://bpaste.net/show/4916d1dbbcb6
[14:40:03] <ngmvit> is there any option to carry out distributed transactions?
[14:43:52] <Muntaner> hello to everyone, I'm pretty new to mongo and need some help with a query. My documents have an array, called "informations". Each entry of this array is an object with two items: {info: 'something', value: 'something'}
[14:44:48] <Muntaner> I'd like to query for partial string matching on the "value" item of the information items
[18:17:07] <N3[2D> I'm running into a "TypeError: schematype.castForQuery is not a function" when using findOne. I've searched stackoverflow and other places couldn't find a proper solution. Code can be found at: https://pastebin.com/S7XeAruv if anyone can point me in the direction of the issue that may cause it or a solution
[18:58:40] <N3[2D> has anyone else run into that?
[19:10:22] <N3[2D> I'm not finding any valid responses as to what could be causing this issue :\
[22:25:22] <N3[2D> anyone around?