Type Definition elastic::client::requests::index_close::IndexCloseRequestBuilder [] [src]

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]

[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_close(index("myindex")).send()?;

assert!(response.acknowledged());

impl IndexCloseRequestBuilder<AsyncSender>
[src]

[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_close(index("myindex")).send();

future.and_then(|response| {
    assert!(response.acknowledged());

    Ok(())
});