I am using following code for creating an index:
When I get new data, queries works very slow, but query.explain() shows that it uses the index.
After some time queries works OK.
What is the reason for it? Do indices need to be manually rebuilt as in CBL 1.4?
I cannot find any documentation regarding this matter
UPDATE: I found out that queries works fine after app restart.
I issue database.createIndex command at every application start.
Does it mean that when I got new data i have to issue database.createIndex again?
Is it so?
UPDATE 2: Confirmed!
I did pull replication and if I issue createIndex again then everything works fine, otherwise indices are not rebuilt automatically.
Is this OK?
I could not find any useful documentation regarding this matter even in sample apps?
How to create an application, based on CBL if its like black box, no infomation available.