Unable to list documents contained in a certain collection

14 views
Skip to first unread message

Rajesh Koilpillai

unread,
Feb 2, 2011, 6:58:55 AM2/2/11
to mongod...@googlegroups.com
I have stored few files using GridFS API in the "docs" collection of "foo" database. But trying to list files from "docs" collection always comes back with empty result, but if files are stored in the default "fs.files" collection it shows up without any issues. The results are provided below, not sure what I am missing here.

> db.docs.files.find()
{ "_id" : ObjectId("4d4907e4a3b5f08dedfa6b13"), "chunkSize" : NumberLong(26
2144), "length" : NumberLong(6160), "md5" : "8ae9ae9053565d42efed7270332cd1
06", "filename" : null, "contentType" : null, "uploadDate" : ISODate("2011-
02-02T07:29:40.473Z"), "aliases" : null }
{ "_id" : ObjectId("4d4942e7fc48f08d1925d90f"), "chunkSize" : NumberLong(26
2144), "length" : NumberLong(0), "md5" : "d41d8cd98f00b204e9800998ecf8427e"
, "filename" : null, "contentType" : null, "uploadDate" : ISODate("2011-02-
02T11:41:27.627Z"), "aliases" : null }
{ "_id" : ObjectId("4d4942e7fc48f08d1a25d90f"), "chunkSize" : NumberLong(26
2144), "length" : NumberLong(1955), "md5" : "d1041318c79455a4abec8db19831d8
ad", "filename" : null, "contentType" : null, "uploadDate" : ISODate("2011-
02-02T11:41:27.640Z"), "aliases" : null }


> db.fs.files.find()
>

c:\mongodb-win32-i386-1.7.5\bin>mongofiles -d foo -c docs list
connected to: 127.0.0.1


--
Thanks,
- Rajesh Koilpillai

Nat

unread,
Feb 2, 2011, 7:33:44 AM2/2/11
to mongodb-user
I don't think -c option is actually supported in mongofiles. You might
want to file an issue at http://jira.mongodb.org

On Feb 2, 7:58 pm, Rajesh Koilpillai <rajesh.koilpil...@gmail.com>
wrote:
> I have stored few files using GridFS API in the "docs" collection of "foo"
> database. But trying to list files from "docs" collection always comes back
> with empty result, but *if* files are stored in the default "fs.files"
Reply all
Reply to author
Forward
0 new messages