I am newbie. I am using Java SDK 2.2.0 on Couchbase 4.0 RC0 to run some N1QL queries which joins more than one bucket. In Java SDK, query is a functionality exposed by the bucket interface. So, if I want to run a N1QL query joining more than one bucket which bucket should I get a handle for (i.e. which bucket name should I pass when invoking Cluster.openBucket(…)). Operations like insert, upsert, delete etc being tied to a bucket makes sense because they working on a document in a bucket but shouldn’t a query be more generic?
Does CouchbaseCluster.create() and Cluster.disconnect() create the necessary connections to the cluster? If so, what does opening and closing a bucket do?