In Mongo shell, after running a mapreduce on collection DEPS with output named STATS:
>show collections
DEPS
STATS
system.indexes
So I see both collections, no problem. However:
>db.DEPS.findOne() <-- returns a DEPS record
>db.STATS.findOne() <-- returns err msg "db.stats.findOne is not a function"
So to see stats data I need to type:
>db.getCollection("STATS").findOne()
This is not a problem, in so far as I can see all the data I need to see. But as a matter of understanding Mongo, why is it that the first collection (created via mongoimport) comes with a findOne method, and the second (created via mapreduce) does not ?
Interesting. Maybe the collection name conflicts with the db.stats() command (which gives you database statistics). I’d not have expected case insensitity here, though.