From the Cloudant web ui I can execute the following query off my indexes :
<>/authoring-test/_design/surveys/_search/multiSearch?q=survey_type%3A%22template%22%20and%20visibility%3A%22public%22
But I am unable to access the same query using the java-cloudant api. My code is as follows :
Search search = db.search("_design/surveys/_search/multiSearch");
log.info("Retrieved search object");
surveys = search.limit(limit)
.includeDocs(false)
.query("survey_type:template", Survey.class);
but it throws a DocumentNotFound exception.
Does anyone have any pointers on how to execute a query using the cloudant java api?