4

I'm trying to run:

db.data.find({email: 'random@test.com'}).collation({locale:'en'})

But I keep getting a .collation is not a function. Am I using the script wrong?

Thanks.

eddiewang
  • 415
  • 5
  • 21
  • Whats the version of your mongodb? It its 2.6, collation is not present. Try running db.version() in your mongo shell to check its version. – Mihir Bhende May 03 '17 at 19:40
  • [collection](https://docs.mongodb.com/manual/reference/collation/#collation-document-fields) in mongoDB 3.4 version – Neo-coder May 03 '17 at 19:42
  • Collation is a new feature in MongoDB 3.4; Robomongo (as at 1.0) does not have support for MongoDB 3.4 yet. For updates see: https://github.com/Studio3T/robomongo/issues/1250. – Stennie May 03 '17 at 19:55

1 Answers1

3

'Collation' is introduced in MongoDB 3.4. It is now possible to use Mongo DB 3.4 with the latest beta: Robomongo 1.1 - Beta version with MongoDB 3.4 Support. Fyi.

Gokhan Simsek
  • 273
  • 1
  • 5