public class Scope extends Object
If no scope is explicitly provided, the default scope is used.
| Modifier and Type | Method and Description |
|---|---|
AnalyticsResult |
analyticsQuery(String statement)
Performs an Analytics query with default
AnalyticsOptions on a scope |
AnalyticsResult |
analyticsQuery(String statement,
AnalyticsOptions options)
Performs an Analytics query with custom
AnalyticsOptions on a scope |
AsyncScope |
async()
Returns the underlying async scope.
|
String |
bucketName()
The name of the bucket this scope is attached to.
|
Collection |
collection(String collectionName)
Opens a collection for this scope with an explicit name.
|
com.couchbase.client.core.Core |
core()
Provides access to the underlying
Core. |
ClusterEnvironment |
environment()
Provides access to the configured
ClusterEnvironment for this scope. |
ScopeEventingFunctionManager |
eventingFunctions()
Provides access to the eventing function management services for functions in this scope.
|
String |
name()
The name of the scope.
|
QueryResult |
query(String statement)
Performs a N1QL query with default
QueryOptions in a Scope |
QueryResult |
query(String statement,
QueryOptions options)
Performs a N1QL query with custom
QueryOptions in a Scope |
ReactiveScope |
reactive()
Provides access to the related
ReactiveScope. |
SearchResult |
search(String indexName,
SearchRequest searchRequest)
Performs a request against the Full Text Search (FTS) service, with default
SearchOptions. |
SearchResult |
search(String indexName,
SearchRequest searchRequest,
SearchOptions options)
Performs a request against the Full Text Search (FTS) service, with custom
SearchOptions. |
ScopeSearchIndexManager |
searchIndexes()
Allows management of scope FTS indexes.
|
SearchResult |
searchQuery(String indexName,
SearchQuery query)
Performs a Full Text Search (FTS) query with default
SearchOptions. |
SearchResult |
searchQuery(String indexName,
SearchQuery query,
SearchOptions options)
Performs a Full Text Search (FTS) query with custom
SearchOptions. |
public String name()
public String bucketName()
public AsyncScope async()
public ReactiveScope reactive()
ReactiveScope.@Stability.Volatile public com.couchbase.client.core.Core core()
Core.
This is advanced API, use with care!
public ClusterEnvironment environment()
ClusterEnvironment for this scope.public Collection collection(String collectionName)
collectionName - the collection name.public QueryResult query(String statement)
QueryOptions in a Scopestatement - the N1QL query statement.QueryResult once the response arrives successfully.com.couchbase.client.core.error.TimeoutException - if the operation times out before getting a result.com.couchbase.client.core.error.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public QueryResult query(String statement, QueryOptions options)
QueryOptions in a Scopestatement - the N1QL query statement as a raw string.options - the custom options for this query.QueryResult once the response arrives successfully.com.couchbase.client.core.error.TimeoutException - if the operation times out before getting a result.com.couchbase.client.core.error.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public AnalyticsResult analyticsQuery(String statement)
AnalyticsOptions on a scopestatement - the Analytics query statement as a raw string.AnalyticsResult once the response arrives successfully.com.couchbase.client.core.error.TimeoutException - if the operation times out before getting a result.com.couchbase.client.core.error.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public AnalyticsResult analyticsQuery(String statement, AnalyticsOptions options)
AnalyticsOptions on a scopestatement - the Analytics query statement as a raw string.options - the custom options for this query.AnalyticsResult once the response arrives successfully.com.couchbase.client.core.error.TimeoutException - if the operation times out before getting a result.com.couchbase.client.core.error.CouchbaseException - for all other error reasons (acts as a base type and catch-all).@Stability.Uncommitted @SinceCouchbase(value="7.6") public SearchResult search(String indexName, SearchRequest searchRequest)
SearchOptions.
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 Cluster instead.
searchRequest - the request, in the form of a SearchRequestSearchResult once the response arrives successfully.com.couchbase.client.core.error.TimeoutException - if the operation times out before getting a result.com.couchbase.client.core.error.CouchbaseException - for all other error reasons (acts as a base type and catch-all).@Stability.Uncommitted @SinceCouchbase(value="7.6") public SearchResult search(String indexName, SearchRequest searchRequest, SearchOptions options)
SearchOptions.
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 Cluster instead.
searchRequest - the request, in the form of a SearchRequestSearchResult once the response arrives successfully.com.couchbase.client.core.error.TimeoutException - if the operation times out before getting a result.com.couchbase.client.core.error.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public SearchResult searchQuery(String indexName, SearchQuery query)
SearchOptions.
This method is for scoped FTS indexes. For global indexes, use Cluster instead.
New users should consider the newer search(String, SearchRequest) interface instead, which can do both the traditional FTS SearchQuery that this method performs,
and/or can also be used to perform a VectorSearch.
query - the query, in the form of a SearchQuerySearchResult once the response arrives successfully.com.couchbase.client.core.error.TimeoutException - if the operation times out before getting a result.com.couchbase.client.core.error.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public SearchResult searchQuery(String indexName, SearchQuery query, SearchOptions options)
SearchOptions.
This method is for scoped FTS indexes. For global indexes, use Cluster instead.
New users should consider the newer search(String, SearchRequest) interface instead, which can do both the traditional FTS SearchQuery that this method performs,
and/or can also be used to perform a VectorSearch.
query - the query, in the form of a SearchQueryoptions - the custom options for this query.SearchResult once the response arrives successfully.com.couchbase.client.core.error.TimeoutException - if the operation times out before getting a result.com.couchbase.client.core.error.CouchbaseException - for all other error reasons (acts as a base type and catch-all).@SinceCouchbase(value="7.6") public ScopeSearchIndexManager searchIndexes()
@Stability.Volatile @SinceCouchbase(value="7.1") public ScopeEventingFunctionManager eventingFunctions()
Copyright © 2024 Couchbase, Inc.. All rights reserved.