Class ScopeSearchIndexManager
java.lang.Object
com.couchbase.client.java.manager.search.ScopeSearchIndexManager
The
ScopeSearchIndexManager allows to manage search indexes.
All management is done with scope FTS indexes. For global FTS indexes, use @SearchIndexManager.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallowQuerying(String name) Allows querying against an index.voidallowQuerying(String name, AllowQueryingSearchIndexOptions options) Allows querying against an index.analyzeDocument(String name, JsonObject document) Allows to see how a document is analyzed against a specific index.analyzeDocument(String name, JsonObject document, AnalyzeDocumentOptions options) Allows to see how a document is analyzed against a specific index.voiddisallowQuerying(String name) Disallows querying against an index.voiddisallowQuerying(String name, DisallowQueryingSearchIndexOptions options) Disallows querying against an index.voidDrops an index.voiddropIndex(String name, DropSearchIndexOptions options) Drops an index.voidfreezePlan(String name) Freeze the assignment of index partitions to nodes.voidfreezePlan(String name, FreezePlanSearchIndexOptions options) Freeze the assignment of index partitions to nodes.Fetches all indexes from the server.getAllIndexes(GetAllSearchIndexesOptions options) Fetches all indexes from the server.Fetches an index from the server if it exists.getIndex(String name, GetSearchIndexOptions options) Fetches an index from the server if it exists.Retrieves the number of documents that have been indexed for an index.getIndexedDocumentsCount(String name, GetIndexedSearchIndexOptions options) Retrieves the number of documents that have been indexed for an index.voidpauseIngest(String name) Pauses updates and maintenance for an index.voidpauseIngest(String name, PauseIngestSearchIndexOptions options) Pauses updates and maintenance for an index.voidresumeIngest(String name) Resumes updates and maintenance for an index.voidresumeIngest(String name, ResumeIngestSearchIndexOptions options) Resumes updates and maintenance for an index.voidunfreezePlan(String name) Unfreeze the assignment of index partitions to nodes.voidunfreezePlan(String name, UnfreezePlanSearchIndexOptions options) Unfreeze the assignment of index partitions to nodes.voidupsertIndex(SearchIndex index) Creates, or updates, an index.voidupsertIndex(SearchIndex index, UpsertSearchIndexOptions options) Creates, or updates, an index.
-
Constructor Details
-
ScopeSearchIndexManager
-
-
Method Details
-
getIndex
Fetches an index from the server if it exists.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName". This should just be the index name, rather than "bucket.scope.indexName".- Returns:
- a
CompletableFuturethe found index once complete.
-
getIndex
Fetches an index from the server if it exists.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".- Returns:
- a
CompletableFuturethe found index once complete.
-
getAllIndexes
Fetches all indexes from the server.- Returns:
- a
CompletableFuturewith all index definitions once complete.
-
getAllIndexes
Fetches all indexes from the server.- Returns:
- a
CompletableFuturewith all index definitions once complete.
-
getIndexedDocumentsCount
Retrieves the number of documents that have been indexed for an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".- Returns:
- a
CompletableFuturewith the indexed documents count once complete.
-
getIndexedDocumentsCount
Retrieves the number of documents that have been indexed for an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".- Returns:
- a
CompletableFuturewith the indexed documents count once complete.
-
upsertIndex
Creates, or updates, an index.- Parameters:
index- the index definition to upsert.
-
upsertIndex
Creates, or updates, an index.- Parameters:
index- the index definition to upsert.
-
dropIndex
Drops an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
dropIndex
Drops an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
analyzeDocument
Allows to see how a document is analyzed against a specific index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".document- the document to analyze.- Returns:
- a
CompletableFuturewith analyzed document parts once complete.
-
analyzeDocument
public List<JsonObject> analyzeDocument(String name, JsonObject document, AnalyzeDocumentOptions options) Allows to see how a document is analyzed against a specific index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".document- the document to analyze.- Returns:
- a
CompletableFuturewith analyzed document parts once complete.
-
pauseIngest
Pauses updates and maintenance for an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
pauseIngest
Pauses updates and maintenance for an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
resumeIngest
Resumes updates and maintenance for an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
resumeIngest
Resumes updates and maintenance for an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
allowQuerying
Allows querying against an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
allowQuerying
Allows querying against an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
disallowQuerying
Disallows querying against an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
disallowQuerying
Disallows querying against an index.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
freezePlan
Freeze the assignment of index partitions to nodes.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
freezePlan
Freeze the assignment of index partitions to nodes.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
unfreezePlan
Unfreeze the assignment of index partitions to nodes.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-
unfreezePlan
Unfreeze the assignment of index partitions to nodes.- Parameters:
name- the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
-