Class ReactiveSearchIndexManager
- java.lang.Object
-
- com.couchbase.client.java.manager.search.ReactiveSearchIndexManager
-
public class ReactiveSearchIndexManager extends Object
TheReactiveSearchIndexManager
allows to manage search index structures in a couchbase cluster.- Since:
- 3.0.0
-
-
Constructor Summary
Constructors Constructor Description ReactiveSearchIndexManager(AsyncSearchIndexManager asyncSearchIndexManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<SearchIndex>
get(String name)
Fetches an already created index from the server.Mono<Void>
insert(SearchIndex index)
Inserts a search index which does not exist already.Mono<Void>
remove(String name)
Removes a search index from the cluster.Mono<Void>
replace(SearchIndex index)
Updates a previously loaded index with new params.
-
-
-
Constructor Detail
-
ReactiveSearchIndexManager
public ReactiveSearchIndexManager(AsyncSearchIndexManager asyncSearchIndexManager)
-
-
Method Detail
-
get
public Mono<SearchIndex> get(String name)
Fetches an already created index from the server.- Parameters:
name
- the name of the search index.- Returns:
- a
Mono
that will complete once the index definition is loaded.
-
insert
public Mono<Void> insert(SearchIndex index)
Inserts a search index which does not exist already.Note that you must create a new index with a new name using
SearchIndex.from(String, SearchIndex)
when fetching an index definition viaget(String)
. Otherwise only replace can be used since a UUID is present which uniquely identifies an index definition on the cluster.- Parameters:
index
- the name of the index.- Returns:
- a
Mono
that will complete once the index definition is inserted.
-
replace
public Mono<Void> replace(SearchIndex index)
Updates a previously loaded index with new params.It is important that the index needs to be loaded from the server when calling this method, since a UUID is present in the response and needs to be subsequently sent to the server on an update request. If you just want to create a new one, use
insert(SearchIndex)
(SearchIndex)} instead.- Parameters:
index
- the index previously loaded viaget(String)
(String)}.- Returns:
- a
Mono
that will complete once the index definition is updated.
-
-