Is it possible to create the same query explained here: Cloudant Selector Query using the next java client: https://github.com/cloudant/java-cloudant?
Asked
Active
Viewed 393 times
1 Answers
2
You can pass the query selector string to the query method e.g.
String selector = "{\"selector\":{\"loansBorrowed\":{\"$elemMatch\":{\"loanamount\":{\"$gt\":1000}}}}}";
QueryResult<ProfileDocumentPojo> result = db.query(selector, ProfileDocumentPojo.class);
List<ProfileDocumentPojo> profiles = result.getDocs();

ricellis
- 396
- 1
- 4
-
Yes, that is what I do now. But is it possible to create this query programmatically using QueryBuilder? – Igor Dumchykov Aug 09 '19 at 06:15
-
It's currently not supported by QueryBuilder. – xpqz Aug 09 '19 at 09:45