Hi, I started up couchbase lite successfully with a listener on android. Then, I successfully pull-replicated from a remote couchdb server. (Almost 2000 documents).
I am able to query a view from the REST api, but I'm having trouble using "getExistingView()" from Java - it's not returning any results. Here's my investigation: First, I get a list of views from the listener REST api running on the phone: http://192.168.1.79:5984/mica/_all_docs?startkey=%22_design/%22&endkey=%22_design0%22 Which returns: {"offset":0,"total_rows":6,"rows":[{"id":"_design/accounts","value":{"_conflicts":[],"rev":"1-52d520c5c33807ae8c71ad15fa5529c3"},"key":"_design/accounts"},{"id":"_design/memorized","value":{"_conflicts":[],"rev":"2-465c63a40e9333efca703f50651a0a2d"},"key":"_design/memorized"},{"id":"_design/mergegroups","value":{"_conflicts":[],"rev":"1-0936d2b16110ecdabfb0b0df1f5ee77f"},"key":"_design/mergegroups"},{"id":"_design/splits","value":{"_conflicts":[],"rev":"1-5ce461648a3220fcc1eeaa470be88c0e"},"key":"_design/splits"},{"id":"_design/stories","value":{"_conflicts":[],"rev":"23-47ed99b6c1b1fa7819962b26231b03d1"},"key":"_design/stories"},{"id":"_design/tonechanges","value":{"_conflicts":[],"rev":"1-defef51d1191b22534854ca476fec30b"},"key":"_design/tonechanges"}]} OK, great! The one I'm interested in is "accounts", so I query that with the rest API: http://192.168.1.79:5984/mica/_design/accounts Which returns: {"views":{"all":{"map":"function(doc) { if (doc._id.indexOf('MICA:accounts:') != -1) { emit(doc._id.replace('MICA:accounts:', ''), doc); } }"}},"language":"javascript","_rev":"1-52d520c5c33807ae8c71ad15fa5529c3","_id":"_design/accounts"} Ok, excellent, so I now, I want to run a query on the first view "accounts/all" mapper, so I do: http://192.168.1.79:5984/mica/_design/accounts/_view/all This crunches for a while an I see a lot of garbage collection messages on the phone via adb logcat, and then the browser fails and returns: {"error":"not_found","reason":"Router unable to route request to do_GET_DesignDocumentjava.lang.reflect.InvocationTargetException"} (What in the world does that mean?) So, I start thinking, "OK, maybe querying from the listener's not so stable", so, instead I try the Java getExistingView() function: View v = database.getExistingView("accounts/all"); But this returns null. So sad. =( Is there some alternative mapping to reference an existing view that was replicated from another location? How exactly is this view supposed to be looked up in Java? Thanks, everyone. - Michael Hines -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/0e995f7f-56d3-40ba-8bc2-b83497dd2d44%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
