0

I am using Couchbase as a nosql database solution for my android app, but I have been having problems loading my data. My app features forms that users can fill out and then view a list of all the forms they've filled out and submitted so they can view and edit their answers. My back end server is running Couchbase 3.0.1 community edition and my app is running Couchbase-lite 1.0.3

My problem is that sometimes when I query couchbase, it returns all my data but sometimes it only returns a subset of my data. For example, I have 15 forms right now but sometimes it will only find 13 or 14. Viewing the list of filled-out form records is unreliable and I often see less records in the list than I know there should be, although I know the data isn't missing because the rest of the records will pop back up spontaneously later. Even letting the phone go to screensaver and then opening it back up and resuming the app will often show a different amount of records in the list than there were before. I am also not always able to log in with all of my user accounts, as sometimes the query for users will only return 25 or so of my 36 existing users and if the account I am trying to use is not one of the ones found, I won't be able to use it to log in.

I think I have noticed that my older data is more reliable than my newer data, but it's hard to say for sure since it's so variable every time I load the app. But my original user account can always log in, while my newer account that I made recently for testing can only log in about half the time.

Why isn't all of my data being found in the query and is there a way that I can force Couchbase to make sure it is getting all existing data?

Community
  • 1
  • 1
Jamie H
  • 1
  • 1
  • when you say you query Couchbase and it returns only partial data, is it the Couchbase Server, through a view? – Simon Baslé Jul 03 '15 at 07:19
  • @SimonBaslé Yes, I get a view from the Couchbase database using getView, then I create a query using createQuery, and then when I run the query to get the QueryEnumerator, that's when I notice the variable amount of data. – Jamie H Jul 07 '15 at 16:36
  • The first thing I'd recommend is to update to Couchbase Lite 1.1. 1.0.3 is getting pretty old. – borrrden Jul 07 '15 at 21:30

0 Answers0