purge bulk of documents ios

37 views
Skip to first unread message

rupa selvaraj

unread,
Aug 7, 2014, 7:10:34 AM8/7/14
to mobile-c...@googlegroups.com
Hi ,
I have checked in several forums and blogs , but I could not find any API method to purge bulk of documents at a single shot .. What I have done is , created a view for the docs to be purgd and purgin it one by one .. Its takes approx 2 mts for 7000 docs ..

Please suggest me a better way to purge selective set of documets, which improves performance and faster.

Thanks

Jens Alfke

unread,
Aug 7, 2014, 8:05:57 PM8/7/14
to mobile-c...@googlegroups.com

On Aug 7, 2014, at 4:10 AM, rupa selvaraj <rups...@gmail.com> wrote:

I have checked in several forums and blogs , but I could not find any API method to purge bulk of documents at a single shot ..  What I have done is , created a view for the docs to be purgd and purgin it one by one .. Its takes approx 2 mts for 7000 docs .. 

There isn't an API for that, so calling purgeDocument on the individual documents is the right way to go. Make sure you do it in a transaction to avoid the overhead of repeated commits to the database file. 

If there were an API to purge multiple documents, it would probably have the same performance as doing it one at a time. (Which I realize is not very good; it will get a lot faster in the future, but not for a while yet.)

—Jens
Reply all
Reply to author
Forward
0 new messages