--
You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
so I don't need to change anything, just make _id: String and since _id is the primary index and since it is a String Mongo will handle everything? No need to call createIndex? Because the way I would call is
groups.createIndex(new BasicDBObject("_id",1))Which would say nothing about the type for _id
On Monday, May 8, 2017 at 8:44:05 AM UTC-7, Ross Lawley wrote:
Hi Pat,The default _id is fine, it can handle any BSON type so strings will be fine.
Ross
On Sun, May 7, 2017 at 5:22 PM, Pat Ferrel <p...@occamsmachete.com> wrote:
I'd like to use a unique string per collection to id a doc.I know I should use collection.createIndex but I don't understand the scaladocs.If my case class is :case class GroupParams (_id: String,//groupId: String,testPeriodStart: DateTime, // ISO8601 datevariants: Seq[String], //["17","18"]testPeriodEnd: Option[DateTime])and I will always use the _id to reference a particular document (no need for _id: ObjectId).I don't care about sorting/ordering since these will only be accessed as individual docs, never cursored through. There seems no reason to have the overhead of another index on the default _id: ObjectId.How to I create the index on the collection with _id: String using Casbah? If I should create a new index and leave the default alone can you show how to do this?
--
You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsubscrib...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsubscrib...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsubscrib...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Ross,
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsubscrib...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsubscrib...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsubscrib...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mongodb-casbah-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-casbah-users+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.