Is it possible to create the same query explained here: Cloudant Selector Query using the next java client: https://github.com/cloudant/java-cloudant?
1 Answer
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();
2 Comments
Igor Dumchykov
Yes, that is what I do now. But is it possible to create this query programmatically using QueryBuilder?
xpqz
It's currently not supported by QueryBuilder.