Couchbase lite, views, indexes, map

Hi all,

I am using Couchbase lite for my application. My application needs to work in online as well as offline mode. That means when it is connected to the internet or no, it should work.

Now to access the data, I am planning to use views/indexes and map functions. However the explanation of views state that “Views belongs to database”, so does it mean that the database on the COuchbase server or the one on Couchbase lite?
Also, please let me know if views need to be updated everytime we replicate the data from the Couchbase server to Couchbase lite ?

Is my approach correct? or is there any better approach

@hideki @simonbasle

Hi @aniket.khedekar,

Now to access the data, I am planning to use views/indexes and map functions. However the explanation of views state that “Views belongs to database”, so does it mean that the database on the COuchbase server or the one on Couchbase lite?

Couchbase Lite. Indexed data is not replicated between CBL and Couchbase Server.

Also, please let me know if views need to be updated everytime we replicate the data from the Couchbase server to Couchbase lite ?

Application does not need to manually update index. Updating index automatically should happen.

Thanks!
Hideki

Thank you so much @hideki.