> On May 16, 2015, at 12:08 PM, Pelle Krøgholt <[email protected]> wrote:
> 
> So now I have a view and in ios/swift I can do view.deleteIndex(). In 
> contrast to do delete index I had like to do view.updateIndex() which I can 
> do in Java. But its not listed in the doc/api

For some reason this method was accidentally not made public in iOS. I’ve just 
filed an issue <https://github.com/couchbase/couchbase-lite-ios/issues/712>. 
I’ll see if there’s time to get it into 1.1 (there should be, as it’s a trivial 
change to mark the method public.)

You never actually have to call this. A view’s index is updated if necessary 
before you query it. But the updateIndex method allows you to shift the time at 
which the re-indexing happens, for instance if you want the work to be done 
immediately after updating a bunch of documents instead of when the user views 
the data.

As a workaround you can issue a query with the smallest possible result set, 
e.g. setting limit=1. That will update the index, and the additional query time 
will be minimal. You can then just ignore the result. (Even better, you can run 
the query asynchronously so the updating happens in the background.)

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/EA91EFB5-CB34-486E-A2BC-35B9D3BA6B97%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to