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