3 unstable releases

0.5.0 Jul 24, 2021
0.4.1 Mar 15, 2021
0.4.0 Mar 14, 2021

#2276 in Database interfaces

Download history 18/week @ 2024-02-26 55/week @ 2024-04-01

55 downloads per month


5.5K SLoC


Latest Version Docs CI

An opinionated Elasticsearch query language for Rust.

This library pairs nicely with the official Elasticsearch crate and the async-graphql crate. It is meant to be a more batteries included approach to working with Elasticsearch in Rust than the official crate (see: elastic/elasticsearch-rs#75).

project status

This project has not yet reached v1.0.0. As such, you can expect some amount of breaking changes. It has also not (yet) been published to crates.io, but most likely will in the future.

We have defined types (optionally with builder methods) for most Elasticsearch aggregations, query DSL and other miscellaneous request/response types.


This crate allows for more idiomatic request/response handling, e.g.:

let query = Request::builder()
    .query(TermQuery::new("id", "test_user_id"))

For more examples, see the examples directory.

differences between the Elasticsearch REST API

Because this project is expected to mainly be used via GraphQL some concessions had to be made to balance idiomatic Rust, Elasticsearch and GraphQL. For example, the structure of aggregation responses is not true to Elasticsearch and is vastly simplified.


Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in elastiql by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


~170K SLoC