Hi guys!
Currently I am implementing in my new project Java SDK 2.0 with async bucket.
Found some unexpected behavior with ViewQuery.endKeyDocId.
When I trying to set endKeyDocId (also startKeyDocId) -> the query result is empty.
The same action via web interface of Couchbase server 3.0 -> return results.
After short investigation I found that in Java object endKeyDocId value wrapped with quotes, but in web interface -> not.
P.S. Hope the version with the critical bug fixes will be published in the near feature.
we are heavily working on a 2.0.1 release which will round of the rough edges of such a large new release.
In order we can track this down more quickly, can you please share your code, what is actually happening and the outcome?
Thanks much,
Michael
Ooops. I wrote a lot to explain the issue but your got it before
You can use java 8 method references like .flatMap(AsyncViewResult::rows())
Thanks! This is my first experience with Java 8
Use bucket.remove(row.id()) directly, no need to create a full document just for removal.
I specially build the Json object for result -> as you can see in below function, the output value is Id’s of all deleted items.
Also here I found some minor issue: Originally “id” of serialized object has been Long -> but after de-serialization to JsonObject -> getLong(“id”) return Exception but getInt(id") work fine. So I did a workaround with getObject(“id”).toString() and convert it to Long
Hmm, can you please elaborate? I talked to our view engineers and they said those two fields should never be quoted, its not JSON.
Or are you referring to a key that contains “” as part of its chars? Because we still do proper encoding of those fields. Can you give me an example that won’t work?