0

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 1

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();
Sign up to request clarification or add additional context in comments.

2 Comments

Yes, that is what I do now. But is it possible to create this query programmatically using QueryBuilder?
It's currently not supported by QueryBuilder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.