When adding a new View to an existing database, how do I track if and when CBL completes building the new index?
Thanks
nat
Views are indexed lazily — no indexing happens when you create the view or when you modify the database. The indexing happens when you query the view: any new/modified documents (which is all documents, the first time) are indexed before the actual query happens.
In 1.3 we’re adding an updateIndex
method on View so you can update the index by itself. Until then we recommend running a trivial query like one with a limit of 1 row.