Closed sbrunot closed 9 years ago
See the Fetch all/multiple documents section of the Readme. It has an example using a list
Unfortunately, this example works only when querying the "_all_docs" view... I would like to be able to query any view, using simple or complex keys. I managed to do so by adding keys(Object[]) method to the com.cloudant.client.api.View and org.lightcouch.View method, and was wondering if it could be added to the api ?
See byComplexKey() in viewsTest for an example of complex keys. There is a start/end e.g. in byStartAndEndKey() too. Over and above that, we welcome Pull requests
As you can seen the byComplexKey only query with one single complex key. I'd be happy to submit a pull request: do you have a documented procedure on how to create a test account on cloudant to run the project unit tests ? I've tried to run the unit tests using a cloudant database created on Bluemix but didn't succeed...
See #29 for another examples of complex keys with start and end. Maybe if show the http request code, i can comment better. What error did u hit with a bluemix created cloudant for running the tests, there is no difference between one created directly from cloudant.com vs bluemix
I've been able to run the tests on my database, so I've created a pull request for you to review: https://github.com/cloudant/java-cloudant/pull/43
fixed via commit 4773586
I want to parse my key into objects from the view. My key is something like this ... Is this possible ?
"key":{
"pId":"xxxx",
"pType":"yyy",
"pName":"xxx",
"spT":"qqqq",
"ind":"Y",
"order":1,
"templ":"aaaaa",
"p":[ "aaaaa"]
}
It seems that a view can only be queried with a single key, using the key(Object...) method of com.cloudant.client.api.View. In the meantime, cloudant allows querying using multiple keys (using query parameter keys=...), so it would be helpful to have a method that allow querying using multiple keys (for example a method keys(Object[]) on the com.cloudant.client.api.View class).