[−][src]Type Definition elastic::client::requests::index_close::IndexCloseRequestBuilder
type IndexCloseRequestBuilder<TSender> = RequestBuilder<TSender, IndexCloseRequestInner>;
A close index request builder that can be configured before sending.
Call Client.index_close
to get an IndexCloseRequestBuilder
.
The send
method will either send the request synchronously or asynchronously, depending on the Client
it was closed from.
Methods
impl IndexCloseRequestBuilder<SyncSender>
[src]
pub fn send(self) -> Result<CommandResponse>
[src]
Send an IndexCloseRequestBuilder
synchronously using a SyncClient
.
This will block the current thread until a response arrives and is deserialised.
Examples
Close an index called myindex
:
let response = client.index("myindex").close().send()?; assert!(response.acknowledged());
impl IndexCloseRequestBuilder<AsyncSender>
[src]
pub fn send(self) -> Pending
[src]
Send an IndexCloseRequestBuilder
asynchronously using an AsyncClient
.
This will return a future that will resolve to the deserialised command response.
Examples
Close an index called myindex
:
let future = client.index("myindex").close().send(); future.and_then(|response| { assert!(response.acknowledged()); Ok(()) });