Class AsyncSearchIndexManager
java.lang.Object
com.couchbase.client.java.manager.search.AsyncSearchIndexManager
public class AsyncSearchIndexManager extends Object
The
AsyncSearchIndexManager allows to manage search index structures in a couchbase cluster.- Since:
- 3.0.0
-
Constructor Summary
Constructors Constructor Description AsyncSearchIndexManager(Core core) -
Method Summary
Modifier and Type Method Description CompletableFuture<Void>allowQuerying(String name)Allows querying against an index.CompletableFuture<Void>allowQuerying(String name, AllowQueryingSearchIndexOptions options)Allows querying against an index.CompletableFuture<List<JsonObject>>analyzeDocument(String name, JsonObject document)Allows to see how a document is analyzed against a specific index.CompletableFuture<List<JsonObject>>analyzeDocument(String name, JsonObject document, AnalyzeDocumentOptions options)Allows to see how a document is analyzed against a specific index.CompletableFuture<Void>disallowQuerying(String name)Disallows querying against an index.CompletableFuture<Void>disallowQuerying(String name, DisallowQueryingSearchIndexOptions options)Disallows querying against an index.CompletableFuture<Void>dropIndex(String name)Drops an index.CompletableFuture<Void>dropIndex(String name, DropSearchIndexOptions options)Drops an index.CompletableFuture<Void>freezePlan(String name)Freeze the assignment of index partitions to nodes.CompletableFuture<Void>freezePlan(String name, FreezePlanSearchIndexOptions options)Freeze the assignment of index partitions to nodes.CompletableFuture<List<SearchIndex>>getAllIndexes()Fetches all indexes from the server.CompletableFuture<List<SearchIndex>>getAllIndexes(GetAllSearchIndexesOptions options)Fetches all indexes from the server.CompletableFuture<SearchIndex>getIndex(String name)Fetches an index from the server if it exists.CompletableFuture<SearchIndex>getIndex(String name, GetSearchIndexOptions options)Fetches an index from the server if it exists.CompletableFuture<Long>getIndexedDocumentsCount(String name)Retrieves the number of documents that have been indexed for an index.CompletableFuture<Long>getIndexedDocumentsCount(String name, GetIndexedSearchIndexOptions options)Retrieves the number of documents that have been indexed for an index.CompletableFuture<Void>pauseIngest(String name)Pauses updates and maintenance for an index.CompletableFuture<Void>pauseIngest(String name, PauseIngestSearchIndexOptions options)Pauses updates and maintenance for an index.CompletableFuture<Void>resumeIngest(String name)Resumes updates and maintenance for an index.CompletableFuture<Void>resumeIngest(String name, ResumeIngestSearchIndexOptions options)Resumes updates and maintenance for an index.CompletableFuture<Void>unfreezePlan(String name)Unfreeze the assignment of index partitions to nodes.CompletableFuture<Void>unfreezePlan(String name, UnfreezePlanSearchIndexOptions options)Unfreeze the assignment of index partitions to nodes.CompletableFuture<Void>upsertIndex(SearchIndex index)Creates, or updates, an index.CompletableFuture<Void>upsertIndex(SearchIndex index, UpsertSearchIndexOptions options)Creates, or updates, an index.
-
Constructor Details
-
AsyncSearchIndexManager
-
-
Method Details
-
getIndex
Fetches an index from the server if it exists.- Parameters:
name- the name of the search index.- 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.- 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.- Returns:
- a
CompletableFuturewith the indexed documents count once complete.
-
getIndexedDocumentsCount
public CompletableFuture<Long> getIndexedDocumentsCount(String name, GetIndexedSearchIndexOptions options)Retrieves the number of documents that have been indexed for an index.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFuturewith the indexed documents count once complete.
-
upsertIndex
Creates, or updates, an index.- Parameters:
index- the index definition to upsert.- Returns:
- a
CompletableFutureindicating request completion.
-
upsertIndex
Creates, or updates, an index.- Parameters:
index- the index definition to upsert.- Returns:
- a
CompletableFutureindicating request completion.
-
dropIndex
Drops an index.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
dropIndex
Drops an index.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
analyzeDocument
Allows to see how a document is analyzed against a specific index.- Parameters:
name- the name of the search index.document- the document to analyze.- Returns:
- a
CompletableFuturewith analyzed document parts once complete.
-
analyzeDocument
public CompletableFuture<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.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.- Returns:
- a
CompletableFutureindicating request completion.
-
pauseIngest
Pauses updates and maintenance for an index.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
resumeIngest
Resumes updates and maintenance for an index.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
resumeIngest
Resumes updates and maintenance for an index.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
allowQuerying
Allows querying against an index.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
allowQuerying
Allows querying against an index.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
disallowQuerying
Disallows querying against an index.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
disallowQuerying
public CompletableFuture<Void> disallowQuerying(String name, DisallowQueryingSearchIndexOptions options)Disallows querying against an index.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
freezePlan
Freeze the assignment of index partitions to nodes.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
freezePlan
Freeze the assignment of index partitions to nodes.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
unfreezePlan
Unfreeze the assignment of index partitions to nodes.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-
unfreezePlan
Unfreeze the assignment of index partitions to nodes.- Parameters:
name- the name of the search index.- Returns:
- a
CompletableFutureindicating request completion.
-