PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 12th of May, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[16:39:09] <daslicht> what do i need to enable that i can connect to a remote mongodb from my computer ?
[16:39:11] <whitglint> I have a question, could I use both $elemMatch and $slice projections?
[16:44:59] <daslicht> http://ghosttx.com/2012/03/how-to-connect-to-a-remote-mongodb-server-with-mongohub-for-mac/
[18:01:45] <joshua> Anyone have experience with changing the mongodb logging format? I see this systemLog.timeStampFormat option which sounds like what I need, but wonder if it can be done without restarting at all
[18:33:04] <joshua> wish the docs would say when a feature was introduced or something.
[18:33:29] <joshua> Oh it does say "new in 2.6"
[18:33:35] <Joeskyyy> http://docs.mongodb.org/manual/release-notes/
[18:33:36] <Joeskyyy> lol
[18:33:45] <joshua> I hate mondays
[18:33:49] <Joeskyyy> ;)
[18:33:55] <Joeskyyy> right up there with you
[18:34:37] <joshua> systemLog.timeStampFormat didn't mention it, but I think our crusty old 2.2 servers don't have it
[19:50:29] <louisrr> I have a question about MongoDB geospatial
[19:51:22] <Derick> shoot!
[19:51:24] <louisrr> what kind of index do I put on my collection
[19:51:32] <louisrr> this is my spatial field
[19:51:59] <Derick> what sort of things are you storing?
[19:52:00] <louisrr> "loc": { "type": "Point", "coordinates": [ -75.0, 28.0 ] }
[19:52:02] <Derick> points, polygons?
[19:52:13] <Derick> yes, that seems to be in ... latin america?
[19:52:27] <Derick> you put a 2dsphere index on loc
[19:52:45] <Joeskyyy> Derick: louisrr is related to what you were helping me poke at earlier (: fwiw
[19:52:50] <Derick> ah
[19:52:51] <louisrr> I think that is close to south Florida
[19:53:02] <Derick> louisrr: it doesn't matter, I am guessing it :)
[19:53:10] <louisrr> thanks joeskyyy
[19:55:22] <louisrr> ok so the mongodb.org site returned this line of code: db.collection.ensureIndex( { <location field> : "2dsphere" } )
[19:55:32] <Derick> yup, that looks good
[19:55:58] <louisrr> I just change collection to the actual name of my collection right?
[19:56:02] <Derick> yes
[19:56:19] <louisrr> and that would be loc
[19:56:55] <louisrr> And for <location field>, I replace that with loc again correct?
[19:57:30] <louisrr> sorry for noob questions questions I am coming over from SQL
[19:59:20] <Derick> yes
[19:59:26] <Derick> "loc": "2dsphere"
[20:00:44] <louisrr> just got that done on the CLI. Thanks!!
[20:09:00] <louisrr> ok I am totally lost on why none of my geospatial queries are working now
[20:11:03] <ranman> louisrr: can you link us to 1) example docs (a few) 2) example query
[20:11:10] <ranman> in a gist or pastebin
[20:11:16] <ranman> also mongodb version?
[20:19:51] <louisrr> I am running MongoDB 2.6.1
[20:20:02] <louisrr> this is the pastebin of the collection
[20:20:04] <louisrr> http://pastebin.com/8SHN5cKj
[20:25:24] <louisrr> thanks for help guys
[20:29:12] <ranman> louisrr: ok and what query are you using that's not working?
[20:30:24] <louisrr> this query returns nothing:
[20:30:27] <louisrr> db.missingpetss.find({loc: {$within: {$center: [[-83.9297222, 39.6847222], 11]}}});
[20:30:47] <cheeser> does that collection exist?
[20:30:56] <cheeser> note "petss"
[20:31:16] <louisrr> lol
[20:31:41] <louisrr> ok so that was a typo now that works
[20:31:43] <cheeser> :)
[20:31:46] <ranman> lol
[20:31:57] <louisrr> now I just have to make it work from PHP and I'll be golden
[20:32:03] <louisrr> thanks
[20:32:22] <ranman> NP, GLHF
[20:32:57] <cheeser> IMMAJMUMOA
[20:34:03] <ranman> cheeser: !?!?!?!?
[20:34:34] <cheeser> Imma Just Make Up My Own Acronyms
[20:38:57] <ranman> cool, that's like mongodb
[20:39:09] <ranman> s/acronym/algorithms
[20:39:10] <ranman> :P
[20:40:45] <q85> haha
[20:42:26] <louisrr> ok so this is the query that works on the CLI
[20:42:28] <louisrr> db.missingpets.find({loc: {$within: {$center: [[-83.9297222, 39.6847222], 11]}}});
[20:43:09] <louisrr> but this fails in PHP
[20:43:11] <louisrr> $query = [loc: => ['$geoWithin' => ['$centerSphere' => [[-83.9297222, 39.6847222], 11]]]];
[20:51:45] <ranman> hooray
[20:53:54] <louisrr> ok I fixed it.
[20:54:02] <shubhang> How are DBRefs supposed to be represented in 2.6? I have a DBRef in 2.4 that is showing up in the upgrade check output as an illegal field name for 2.6
[20:54:53] <cheeser> why would it be a field name?
[20:55:30] <shubhang> The DBRef convention is an object with the following fields: "$ref", "$id" and "$db"
[20:55:47] <shubhang> per: http://docs.mongodb.org/manual/reference/database-references/#dbrefs
[20:55:56] <cheeser> yes. but that's a field value not a field name.
[20:56:40] <shubhang> um, no, it's a field name, for example: { "$ref": <value>, "$id": <value>, "$db": <value> }
[20:57:04] <cheeser> "$ref" is a field name there, yes.
[20:57:09] <shubhang> exactly
[20:57:11] <cheeser> DbRefs are values
[20:57:44] <shubhang> yes, I understand that but Mongo doesn't make any distinction between a top level field name and a nested field name
[20:57:54] <shubhang> both of those are not permitted to have a dollar prefix
[20:58:00] <shubhang> s/both/neither/
[20:59:22] <shubhang> Since DBRef is a convention rather than a type, I can see why the upgrade check would complain about it, but there doesn't appear to be any guidance in the release notes as to how to mitigate this
[21:24:09] <frodo_baggins> So, is it somewhat of an anti-pattern to use references with schemaless, document-oriented databases?
[21:25:58] <frodo_baggins> I was thinking, with the application I'm developing now, that I could either do what was natural when I worked with relational databases, or I could try to develop the application so that each document in the database is one concise, solid unit, without the need to go and fetch additional, supplemental documents.
[21:26:26] <frodo_baggins> A sort of... single query approach.
[22:02:28] <dmitriy1_> Hi there, Our company (knewton.com) is looking for MySQL or Postgres DBA who is willing to learn noSQL. If you interested , please ping me. We offer remote work option
[23:26:06] <NaN> how can I specify for tab delimiter on CSV files with mongoimport?
[23:32:14] <joannac> NaN: http://docs.mongodb.org/manual/reference/program/mongoimport/#cmdoption--type
[23:42:27] <NaN> joannac: that will specify CSV for the import, but not the delimiter used on the CSV (, ; <tab>)
[23:48:35] <joannac> um, --type tsv ?