My pc is running with mongo 1.6.5 .
One of my collections has 973525 records when I try to find distinct key on that collection its giving me Exception
the query is
db.collection.distinct("id")
java.lang.IllegalArgumentException: 'ok' should never be null...
at com.mongodb.CommandResult.ok(CommandResult.java:30)
at com.mongodb.CommandResult.throwOnError(CommandResult.java:60)
at com.mongodb.DBCollection.distinct(DBCollection.java:756)
at com.mongodb.DBCollection.distinct(DBCollection.java:741)
at com.test.TestMongo$.<init>(TestMongo.scala:26)
at com.test.TestMongo$.<clinit>(TestMongo.scala)
at com.test.TestMongo.startTesting(TestMongo.scala)
at com.test.Main.main(Main.java:13)
And when i try same query in mongo terminal gives error
Thu Mar 10 21:40:20 uncaught exception: error { "$err" : "Invalid BSONObj spec size: 8692881 (91A48400)", "code" : 10334 }