Crates.io | elastiql |
lib.rs | elastiql |
version | 0.5.0 |
source | src |
created_at | 2021-03-14 02:19:18.100095 |
updated_at | 2021-07-24 21:42:11.556894 |
description | An opinionated Elasticsearch query language for Rust. |
homepage | |
repository | https://github.com/voxjar/elastiql |
max_upload_size | |
id | 368583 |
size | 432,169 |
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).
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"))
.size(1)
.version(true)
.highlight(HighlightOptions::default())
.build();
For more examples, see the examples directory.
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.