Class AsyncScope
If no scope is explicitly provided, the default scope is used.
- Since:
- 3.0.0
- 
Method SummaryModifier and TypeMethodDescriptionanalyticsQuery(String statement) Performs an Analytics query with defaultAnalyticsOptions.analyticsQuery(String statement, AnalyticsOptions options) Performs an Analytics query with customAnalyticsOptions.The name of the bucket this scope is attached to.collection(String collectionName) Opens a collection for this scope with an explicit name.core()Provides access to the underlyingCore.Provides access to the configuredClusterEnvironmentfor this scope.Provides access to the eventing function management services for functions in this scope.name()The name of the scope.Performs a N1QL query with defaultQueryOptionsin a Scopequery(String statement, QueryOptions options) Performs a N1QL query with customQueryOptionsin a Scope.search(String indexName, SearchRequest searchRequest) Performs a request against the Full Text Search (FTS) service, with defaultSearchOptions.search(String indexName, SearchRequest searchRequest, SearchOptions options) Performs a request against the Full Text Search (FTS) service, with customSearchOptions.Allows managed scope FTS indexes.searchQuery(String indexName, SearchQuery query) Performs a Full Text Search (FTS) query with defaultSearchOptions.searchQuery(String indexName, SearchQuery query, SearchOptions options) Performs a Full Text Search (FTS) query with customSearchOptions.
- 
Method Details- 
nameThe name of the scope.
- 
bucketNameThe name of the bucket this scope is attached to.
- 
coreProvides access to the underlyingCore.This is advanced API, use with care! 
- 
environmentProvides access to the configuredClusterEnvironmentfor this scope.
- 
collectionOpens a collection for this scope with an explicit name.- Parameters:
- collectionName- the collection name.
- Returns:
- the requested collection if successful.
 
- 
queryPerforms a N1QL query with defaultQueryOptionsin a Scope- Parameters:
- statement- the N1QL query statement.
- Returns:
- the QueryResultonce the response arrives successfully.
- Throws:
- TimeoutException- if the operation times out before getting a result.
- CouchbaseException- for all other error reasons (acts as a base type and catch-all).
 
- 
queryPerforms a N1QL query with customQueryOptionsin a Scope.- Parameters:
- statement- the N1QL query statement as a raw string.
- options- the custom options for this query.
- Returns:
- the QueryResultonce the response arrives successfully.
 
- 
analyticsQueryPerforms an Analytics query with defaultAnalyticsOptions.- Parameters:
- statement- the Analytics query statement as a raw string.
- Returns:
- the AnalyticsResultonce the response arrives successfully.
 
- 
analyticsQuerypublic CompletableFuture<AnalyticsResult> analyticsQuery(String statement, AnalyticsOptions options) Performs an Analytics query with customAnalyticsOptions.- Parameters:
- statement- the Analytics query statement as a raw string.
- options- the custom options for this analytics query.
- Returns:
- the AnalyticsResultonce the response arrives successfully.
 
- 
search@SinceCouchbase("7.6") public CompletableFuture<SearchResult> search(String indexName, SearchRequest searchRequest) Performs a request against the Full Text Search (FTS) service, with defaultSearchOptions.This can be used to perform a traditional FTS query, and/or a vector search. This method is for scoped FTS indexes. For global indexes, use AsyncClusterinstead.- Parameters:
- searchRequest- the request, in the form of a- SearchRequest
- Returns:
- the SearchResultonce the response arrives successfully, inside aCompletableFuture
- Throws:
- TimeoutException- if the operation times out before getting a result.
- CouchbaseException- for all other error reasons (acts as a base type and catch-all).
 
- 
search@SinceCouchbase("7.6") public CompletableFuture<SearchResult> search(String indexName, SearchRequest searchRequest, SearchOptions options) Performs a request against the Full Text Search (FTS) service, with customSearchOptions.This can be used to perform a traditional FTS query, and/or a vector search. This method is for scoped FTS indexes. For global indexes, use AsyncClusterinstead.- Parameters:
- searchRequest- the request, in the form of a- SearchRequest
- Returns:
- the SearchResultonce the response arrives successfully, inside aCompletableFuture
- Throws:
- TimeoutException- if the operation times out before getting a result.
- CouchbaseException- for all other error reasons (acts as a base type and catch-all).
 
- 
searchQueryPerforms a Full Text Search (FTS) query with defaultSearchOptions.This method is for scoped FTS indexes. For global indexes, use AsyncClusterinstead.New users should consider the newer search(String, SearchRequest)interface instead, which can do both the traditional FTSSearchQuerythat this method performs, and/or can also be used to perform aVectorSearch.- Parameters:
- query- the query, in the form of a- SearchQuery
- Returns:
- the SearchResultonce the response arrives successfully, inside aCompletableFuture
 
- 
searchQuery@Volatile public CompletableFuture<SearchResult> searchQuery(String indexName, SearchQuery query, SearchOptions options) Performs a Full Text Search (FTS) query with customSearchOptions.This method is for scoped FTS indexes. For global indexes, use AsyncClusterinstead.New users should consider the newer search(String, SearchRequest)interface instead, which can do both the traditional FTSSearchQuerythat this method performs, and/or can also be used to perform aVectorSearch.- Parameters:
- query- the query, in the form of a- SearchQuery
- options- the custom options for this query.
- Returns:
- the SearchResultonce the response arrives successfully, inside aCompletableFuture
 
- 
searchIndexesAllows managed scope FTS indexes.
- 
eventingFunctionsProvides access to the eventing function management services for functions in this scope.
 
-