elastic 0.1.0

A client for the Elassticsearch REST API.
Documentation

Elastic

elastic_* is an ecosystem of community crates for interacting with Elasticsearch from Rust. The API is targetting Elastic 5.x.

Crate functionality covers:

Quick reference:

Goals

To provide a strongly-typed, full-featured and efficient Elasticsearch client for Rust over (eventually) asynchronous io. Rust gives us a lot of tools for building super-performant but highly accessible libraries, which we aim to continue.

The REST API is provided by an inline JSON macro so it's efficient and always in line with whatever version of Elasticsearch you're targeting.

This means you don't need to learn another API for interacting with Elasticsearch; queries mocked in Sense can literally just be copy+pasted into your Rust code.

The core focus of this project is on strong typing over the core types and responses in Elasticsearch, rather than trying to map the entire Query DSL.

Support for Elastic's plugin products, like watcher and graph could be added as feature-gated modules in the elastic_hyper and elastic_rotor clients and elastic_types as necessary.

Development

Development is active, but because functionality is split across crates it can be hard to track where the effort is going. There is a GitHub Project to easily track priorities at the crate-level.

Crates

elastic_hyper

elastic_hyper provides a synchronous hyper implementation of the Elasticsearch REST API.

This crate lives in the elastic_hyper repo.

elastic_types

elastic_types is a library for building Elasticsearch types in Rust. Define your Elasticsearch types as PORS (Plain Old Rust Structures) and generate an equivalent Elasticsearch mapping from them, where correctness is enforced by Rust's type system.

This crate lives in the elastic_types repo.

elastic_rotor

elastic_rotor is an experimental REST API client that handles a single specific usecase: high throughput.

elastic_codegen

Provides code generation for the Elasticsearch REST API from the official spec and generic helpers for rust source and integration tests. The goal is to keep this package fairly agnostic, so the same ast can be used to generate other kinds of output.

Right now, it's used by elastic_hyper to build the client, but could also be used to generate other implementations.

Alternatives

If you'd like to use a strongly-typed Query DSL builder see rs-es. This client does the hard work of providing an idiomatic Rust API for interacting with Elasticsearch.