code: public InputStream queryForStream(String query) {
          key(query);
          URI uri = databaseHelper.build();
          HttpConnection get = Http.GET(uri);
          get.requestProperties.put("Accept", "application/json");
          return client.couchDbClient.executeToInputStream(get);
      }
docs: Performs a Cloudant Search and returns the result as an {@link InputStream}
  
  @param query the Lucene query to be passed to the Search index
  <p>The stream should be properly closed after usage, as to avoid connection
  leaks.
  @return The result as an {@link InputStream}.