Skip to content

Commit 95dab09

Browse files
Import snipping
1 parent 455f32e commit 95dab09

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

modules/devguide/examples/java/SimpleVectorQuery.java

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1+
/*
2+
* Copyright (c) 2021 Couchbase, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116

2-
import com.couchbase.client.java.Bucket;
3-
import com.couchbase.client.java.Cluster;
4-
import com.couchbase.client.java.Scope;
17+
// tag::imports[]
518
import com.couchbase.client.core.error.CouchbaseException;
6-
import com.couchbase.client.java.json.JsonArray;
19+
import com.couchbase.client.java.Cluster;
20+
import com.couchbase.client.java.ClusterOptions;
721
import com.couchbase.client.java.json.JsonObject;
822
import com.couchbase.client.java.query.QueryResult;
9-
import com.couchbase.client.java.query.QueryScanConsistency;
10-
import com.couchbase.client.java.query.ReactiveQueryResult;
11-
import com.couchbase.client.java.json.JsonObject;
12-
import com.couchbase.client.java.ClusterOptions;
13-
import reactor.core.publisher.Mono;
14-
15-
import java.util.UUID;
16-
1723
import static com.couchbase.client.java.query.QueryOptions.queryOptions;
24+
// tag::imports[]
1825

1926
public class SimpleVectorQuery {
2027
static String connectionString = "couchbases://cb.<your-endpoint-here>.cloud.couchbase.com";
@@ -31,7 +38,7 @@ public static void main(String[] args) throws Exception {
3138

3239
{
3340
try {
34-
// tag::hyperscale[]
41+
// tag::hyperscale[]
3542
QueryResult result = cluster.query(
3643
"SELECT d.id, d.question, d.wanted_similar_color_from_search, " +
3744
" ARRAY_CONCAT( " +
@@ -45,7 +52,7 @@ public static void main(String[] args) throws Exception {
4552
for (JsonObject row : result.rowsAsObject()) {
4653
System.out.println(row);
4754
}
48-
// end::hyperscale[]
55+
// end::hyperscale[]
4956
} catch (CouchbaseException ex) {
5057
ex.printStackTrace();
5158
}

0 commit comments

Comments
 (0)