Struct rs_es::Client [] [src]

pub struct Client {
    // some fields omitted
}

The core of the ElasticSearch client, owns a HTTP connection.

Each instance of Client is reusable, but only one thread can use each one at once. This will be enforced by the borrow-checker as most methods are defined on &mut self.

To create a Client, the hostname and port need to be specified.

Each ElasticSearch API operation is defined as a method on Client. Any compulsory parameters must be given as arguments to this method. It returns an operation builder that can be used to add any optional parameters.

Finally send is called to submit the operation:

Examples

use rs_es::Client;

let mut client = Client::new("localhost", 9200);

See the specific operations and their builder objects for details.

Methods

impl Client
[src]

impl Client
[src]

impl Client
[src]

Delete given index

TODO: ensure all options are supported, replace with a DeleteIndexOperation to follow the pattern defined elsewhere.

See: https://www.elastic.co/guide/en/elasticsearch/reference/2.x/indices-delete-index.html

impl Client
[src]

impl Client
[src]

An index operation to index a document in the specified index.

See: https://www.elastic.co/guide/en/elasticsearch/reference/1.x/docs-index_.html

impl Client
[src]

impl Client
[src]

impl Client
[src]

impl Client
[src]

Open the index, making it available.

Close the index, making it unavailable and modifiable.

impl Client
[src]

Calls the base ES path, returning the version number

impl Client
[src]

Create a new client

Take a nearly complete ElasticSearch URL, and stick the host/port part on the front.