Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View not indexing older revisions #578

Closed
hideki opened this issue Feb 2, 2015 · 1 comment
Closed

View not indexing older revisions #578

hideki opened this issue Feb 2, 2015 · 1 comment

Comments

@hideki
Copy link

hideki commented Feb 2, 2015

This issue was originally reported for CBL Android. I observed same issue with CBL iOS

For details, please refer https://github.com/couchbase/couchbase-lite-android/issues/494

hideki pushed a commit that referenced this issue Feb 2, 2015
- Issue: View not indexing older revisions
@snej
Copy link
Contributor

snej commented Feb 2, 2015

Yup, I reproduce it too. The problem is that the revision that was just added is a deletion, and the SQL query used by the view indexer skips deletions since they normally don't get indexed. But in this case the deletion makes an earlier revision become the winning one.

It looks like the quick fix is to remove AND deleted=0 from that query. Unfortunately that will slow down indexing somewhat, because the main loop will scan deletions even though 99% of them aren't relevant. I can think of better fixes but they involve larger changes (including to the db schema.)

@snej snej self-assigned this Feb 2, 2015
@snej snej added this to the 1.1.0 milestone Feb 2, 2015
hideki pushed a commit that referenced this issue Feb 2, 2015
- Issue: View not indexing older revisions
@snej snej closed this as completed in 2b465f7 Feb 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants