I have an app that uses the Realm Swift SDK and is synced to the cloud via MongoDB Atlas Device Sync. It has a model object like:
final class Foo: Object
{
@Persisted var name: String = ""
}
There are 900,000 of these objects in the database. Is it possible for me to add an index to this property without any schema violations, migrations, or sync failures? Can I just change the declaration to:
@Persisted(indexed: true) var name: String = ""
If I cannot do this, what is the process for adding an index to an already-existent property?
(NB: I did ask this question on the MongoDB forums first, but got no response.)