haider_kazal
haider_kazal

Reputation: 3468

Couchbase Lite Swift - Indexing on optional property

I need to index a property in a Couchbase Lite database, and the property is optional, i.e. not present in all documents. I wanted to know if this kind of indexing is supported in Couchbase Lite.

Upvotes: 0

Views: 98

Answers (1)

G. Blake Meike
G. Blake Meike

Reputation: 6715

Yes.

It is entirely possible to put an index on a property that is not present in all documents or a property whose value is nil in some documents.

Documents with properties like that might be represented in Swift, as Optionals.

Upvotes: 1

Related Questions