index after insert

39 views
Skip to first unread message

Hasan Gharehasanloo

unread,
Feb 25, 2014, 1:49:00 AM2/25/14
to mobile-c...@googlegroups.com
Hi everybody
I am using CBLie in an android application. In a function I insert about 1000 document to database, after that I run a query on one of my views. For the first run, it takes time more than usual time, and in log I can see that it is re-indexing view over those newly added documents.
I want to know, is there any way to re-index views (automatically or manually) after inserting, in order to prevent delay on first run of query? If we can do it in background, it would be quite better.

------------------------------------------------
Best Regards

Hasan Gharehasanloo

Front-end Web Developer

Email: h_g...@yahoo.com
Cell: (0098) 912-462-4557
LinkedIn: linkedin.com/fa/hghare

Jens Alfke

unread,
Feb 25, 2014, 2:41:12 PM2/25/14
to mobile-c...@googlegroups.com
On Feb 24, 2014, at 10:49 PM, Hasan Gharehasanloo <hasan...@gmail.com> wrote:

I want to know, is there any way to re-index views (automatically or manually) after inserting, in order to prevent delay on first run of query?

Indexes are updated on demand. You can force one by issuing a simple query and ignoring the result.

—Jens
Reply all
Reply to author
Forward
0 new messages