Skip to content

Commit 587865b

Browse files
committed
JVMCBC-1496 Promote Vector Search from volatile to uncommitted public API
including scope-level search. Also marking scope/vector search as @SinceCouchbase("7.6"). Change-Id: Iaa144120d11251c3f697e96b4767de6864132e72 Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/206831 Reviewed-by: David Nault <[email protected]> Tested-by: Build Bot <[email protected]>
1 parent 2b29be2 commit 587865b

File tree

24 files changed

+73
-58
lines changed

24 files changed

+73
-58
lines changed

java-client/src/main/java/com/couchbase/client/java/AsyncCluster.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ AnalyticsRequest analyticsRequest(final String statement, final AnalyticsOptions
418418
* @throws TimeoutException if the operation times out before getting a result.
419419
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
420420
*/
421-
@Stability.Volatile
421+
@Stability.Uncommitted
422422
public CompletableFuture<SearchResult> search(final String indexName, final SearchRequest searchRequest) {
423423
return search(indexName, searchRequest, DEFAULT_SEARCH_OPTIONS);
424424
}
@@ -435,7 +435,7 @@ public CompletableFuture<SearchResult> search(final String indexName, final Sear
435435
* @throws TimeoutException if the operation times out before getting a result.
436436
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
437437
*/
438-
@Stability.Volatile
438+
@Stability.Uncommitted
439439
public CompletableFuture<SearchResult> search(final String indexName, final SearchRequest searchRequest, final SearchOptions options) {
440440
notNull(searchRequest, "SearchRequest", () -> new ReducedSearchErrorContext(indexName, null));
441441
notNull(options, "SearchOptions", () -> new ReducedSearchErrorContext(indexName, null));

java-client/src/main/java/com/couchbase/client/java/AsyncScope.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ AnalyticsRequest analyticsRequest(final String statement, final AnalyticsOptions
304304
* @throws TimeoutException if the operation times out before getting a result.
305305
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
306306
*/
307-
@Stability.Volatile
307+
@Stability.Uncommitted
308+
@SinceCouchbase("7.6")
308309
public CompletableFuture<SearchResult> search(final String indexName, final SearchRequest searchRequest) {
309310
return search(indexName, searchRequest, DEFAULT_SEARCH_OPTIONS);
310311
}
@@ -321,7 +322,8 @@ public CompletableFuture<SearchResult> search(final String indexName, final Sear
321322
* @throws TimeoutException if the operation times out before getting a result.
322323
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
323324
*/
324-
@Stability.Volatile
325+
@Stability.Uncommitted
326+
@SinceCouchbase("7.6")
325327
public CompletableFuture<SearchResult> search(final String indexName, final SearchRequest searchRequest, final SearchOptions options) {
326328
notNull(searchRequest, "SearchRequest", () -> new ReducedSearchErrorContext(indexName, null));
327329
notNull(options, "SearchOptions", () -> new ReducedSearchErrorContext(indexName, null));

java-client/src/main/java/com/couchbase/client/java/Cluster.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ public AnalyticsResult analyticsQuery(final String statement, final AnalyticsOpt
445445
* @throws TimeoutException if the operation times out before getting a result.
446446
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
447447
*/
448-
@Stability.Volatile
448+
@Stability.Uncommitted
449449
public SearchResult search(final String indexName, final SearchRequest searchRequest) {
450450
return search(indexName, searchRequest, DEFAULT_SEARCH_OPTIONS);
451451
}
@@ -462,7 +462,7 @@ public SearchResult search(final String indexName, final SearchRequest searchReq
462462
* @throws TimeoutException if the operation times out before getting a result.
463463
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
464464
*/
465-
@Stability.Volatile
465+
@Stability.Uncommitted
466466
public SearchResult search(final String indexName, final SearchRequest searchRequest, final SearchOptions options) {
467467
return block(asyncCluster.search(indexName, searchRequest, options));
468468
}

java-client/src/main/java/com/couchbase/client/java/ReactiveCluster.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public Mono<ReactiveAnalyticsResult> analyticsQuery(final String statement, fina
328328
* @throws TimeoutException if the operation times out before getting a result.
329329
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
330330
*/
331-
@Stability.Volatile
331+
@Stability.Uncommitted
332332
public Mono<ReactiveSearchResult> search(final String indexName, final SearchRequest searchRequest) {
333333
return search(indexName, searchRequest, DEFAULT_SEARCH_OPTIONS);
334334
}
@@ -345,7 +345,7 @@ public Mono<ReactiveSearchResult> search(final String indexName, final SearchReq
345345
* @throws TimeoutException if the operation times out before getting a result.
346346
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
347347
*/
348-
@Stability.Volatile
348+
@Stability.Uncommitted
349349
public Mono<ReactiveSearchResult> search(final String indexName, final SearchRequest searchRequest, final SearchOptions options) {
350350
notNull(searchRequest, "SearchRequest", () -> new ReducedSearchErrorContext(indexName, null));
351351
notNull(options, "SearchOptions", () -> new ReducedSearchErrorContext(indexName, null));

java-client/src/main/java/com/couchbase/client/java/ReactiveScope.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.couchbase.client.java;
1818

1919
import com.couchbase.client.core.Core;
20+
import com.couchbase.client.core.annotation.SinceCouchbase;
2021
import com.couchbase.client.core.annotation.Stability;
2122
import com.couchbase.client.core.api.search.CoreSearchQuery;
2223
import com.couchbase.client.core.api.search.queries.CoreSearchRequest;
@@ -209,7 +210,8 @@ public Mono<ReactiveAnalyticsResult> analyticsQuery(final String statement, fina
209210
* @throws TimeoutException if the operation times out before getting a result.
210211
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
211212
*/
212-
@Stability.Volatile
213+
@Stability.Uncommitted
214+
@SinceCouchbase("7.6")
213215
public Mono<ReactiveSearchResult> search(final String indexName, final SearchRequest searchRequest) {
214216
return search(indexName, searchRequest, DEFAULT_SEARCH_OPTIONS);
215217
}
@@ -226,7 +228,8 @@ public Mono<ReactiveSearchResult> search(final String indexName, final SearchReq
226228
* @throws TimeoutException if the operation times out before getting a result.
227229
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
228230
*/
229-
@Stability.Volatile
231+
@Stability.Uncommitted
232+
@SinceCouchbase("7.6")
230233
public Mono<ReactiveSearchResult> search(final String indexName, final SearchRequest searchRequest, final SearchOptions options) {
231234
notNull(searchRequest, "SearchRequest", () -> new ReducedSearchErrorContext(indexName, null));
232235
notNull(options, "SearchOptions", () -> new ReducedSearchErrorContext(indexName, null));

java-client/src/main/java/com/couchbase/client/java/Scope.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ public AnalyticsResult analyticsQuery(final String statement, final AnalyticsOpt
217217
* @throws TimeoutException if the operation times out before getting a result.
218218
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
219219
*/
220+
@Stability.Uncommitted
221+
@SinceCouchbase("7.6")
220222
public SearchResult search(final String indexName, final SearchRequest searchRequest) {
221223
return search(indexName, searchRequest, DEFAULT_SEARCH_OPTIONS);
222224
}
@@ -233,6 +235,8 @@ public SearchResult search(final String indexName, final SearchRequest searchReq
233235
* @throws TimeoutException if the operation times out before getting a result.
234236
* @throws CouchbaseException for all other error reasons (acts as a base type and catch-all).
235237
*/
238+
@Stability.Uncommitted
239+
@SinceCouchbase("7.6")
236240
public SearchResult search(final String indexName, final SearchRequest searchRequest, final SearchOptions options) {
237241
return block(async().search(indexName, searchRequest, options));
238242
}

java-client/src/main/java/com/couchbase/client/java/search/SearchRequest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
*/
1616
package com.couchbase.client.java.search;
1717

18+
import com.couchbase.client.core.annotation.SinceCouchbase;
1819
import com.couchbase.client.core.annotation.Stability;
1920
import com.couchbase.client.core.api.search.queries.CoreSearchRequest;
2021
import com.couchbase.client.core.error.InvalidArgumentException;
21-
import com.couchbase.client.java.search.queries.MatchNoneQuery;
2222
import com.couchbase.client.java.search.vector.VectorSearch;
2323
import reactor.util.annotation.Nullable;
2424

@@ -29,7 +29,7 @@
2929
* <p>
3030
* If both are provided, the FTS service will merge the results.
3131
*/
32-
@Stability.Volatile
32+
@Stability.Uncommitted
3333
public class SearchRequest {
3434

3535
private @Nullable SearchQuery searchQuery;
@@ -77,6 +77,7 @@ public SearchRequest searchQuery(SearchQuery searchQuery) {
7777
*
7878
* @return this, for chaining purposes.
7979
*/
80+
@SinceCouchbase("7.6")
8081
public SearchRequest vectorSearch(VectorSearch vectorSearch) {
8182
if (this.vectorSearch != null) {
8283
throw new InvalidArgumentException("A VectorSearch has already been specified. Note that a single VectorSearch can take multiple VectorQuery objects, allowing multiple vector queries to be run.", null, null);

java-client/src/main/java/com/couchbase/client/java/search/vector/VectorQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import com.couchbase.client.core.api.search.vector.CoreVectorQuery;
2020
import reactor.util.annotation.Nullable;
2121

22-
@Stability.Volatile
22+
@Stability.Uncommitted
2323
public class VectorQuery {
2424
private final float[] vectorQuery;
2525
private final String vectorField;

java-client/src/main/java/com/couchbase/client/java/search/vector/VectorQueryCombination.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* Controls how multiple vector queries are combined.
2323
*/
24-
@Stability.Volatile
24+
@Stability.Uncommitted
2525
public enum VectorQueryCombination {
2626
/**
2727
* All vector queries must match a document for it to be included.

java-client/src/main/java/com/couchbase/client/java/search/vector/VectorSearch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* A VectorSearch allows one or more individual {@link VectorQuery}s to be executed.
3030
*/
31-
@Stability.Volatile
31+
@Stability.Uncommitted
3232
public class VectorSearch {
3333

3434
private final List<VectorQuery> vectorQueries;

0 commit comments

Comments
 (0)