Official Elasticsearch Rust Client

Overview

elasticsearch   Latest Version Docs Apache-2 licensed

Official Rust Client for Elasticsearch.

Full documentation is available at https://docs.rs/elasticsearch

The project is still very much a work in progress and in an alpha state; input and contributions welcome!

Versions and Compatibility

Rust client Elasticsearch Status
7.x 7.x alpha

A major version of the client is compatible with the same major version of Elasticsearch. Since Elasticsearch is developed following Semantic Versioning principles, Any minor/patch version of the client can be used against any minor/patch version of Elasticsearch within the same major version lineage. For example,

  • A 7.5.0 client can be used against 7.0.0 Elasticsearch
  • A 7.5.0 client can be used against 7.6.0 Elasticsearch

In the former case, a 7.5.0 client may contain additional API functions that are not available in 7.0.0 Elasticsearch. In this case, these APIs cannot be used, but for any APIs available in Elasticsearch, the respective API functions on the client will be compatible.

In the latter case, a 7.5.0 client won't contain API functions for APIs that are introduced in Elasticsearch 7.6.0+, but for all other APIs available in Elasticsearch, the respective API functions on the client will be compatible.

No compatibility assurances are given between different major versions of the client and Elasticsearch. Major differences likely exist between major versions of Elasticsearch, particularly around request and response object formats, but also around API urls and behaviour.

Features

The following are a list of Cargo features that can be enabled or disabled:

  • native-tls (enabled by default): Enables TLS functionality provided by native-tls.
  • rustls-tls: Enables TLS functionality provided by rustls.
  • beta-apis: Enables beta APIs. Beta APIs are on track to become stable and permanent features. Use them with caution because it is possible that breaking changes are made to these APIs in a minor version.
  • experimental-apis: Enables experimental APIs. Experimental APIs are just that - an experiment. An experimental API might have breaking changes in any future version, or it might even be removed entirely. This feature also enables beta-apis.

Getting started

The client exposes all Elasticsearch APIs as associated functions, either on the root client, Elasticsearch, or on one of the namespaced clients, such as Cat, Indices, etc. The namespaced clients are based on the grouping of APIs within the Elasticsearch and X-Pack REST API specs from which much of the client is generated. All API functions are async only, and can be awaited.

Installing

Add elasticsearch crate and version to Cargo.toml. Choose the version that is compatible with the version of Elasticsearch you're using

[dependencies]
elasticsearch = "8.0.0-alpha.1"

The following optional dependencies may also be useful to create requests and read responses

serde = "~1"
serde_json = "~1"

Async support with tokio

The client uses reqwest to make HTTP calls, which internally uses the tokio runtime for async support. As such, you may require to take a dependency on tokio in order to use the client. For example, in Cargo.toml, you may need the following dependency,

tokio = { version = "*", features = ["full"] }

and to attribute async main function with #[tokio::main]

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // your code ...
    Ok(())
}

and attribute test functions with #[tokio::test]

#[tokio::test]
async fn my_test() -> Result<(), Box<dyn std::error::Error>> {
    // your code ...
    Ok(())
}

Create a client

Build a transport to make API requests to Elasticsearch using the TransportBuilder, which allows setting of proxies, authentication schemes, certificate validation, and other transport related settings.

To create a client to make API calls to Elasticsearch running on http://localhost:9200

use elasticsearch::Elasticsearch;

fn main() {
    let client = Elasticsearch::default();
}

Alternatively, you can create a client to make API calls against Elasticsearch running on a specific url

use elasticsearch::{
    Elasticsearch, Error, 
    http::transport::Transport
};

fn main() -> Result<(), Error> {
    let transport = Transport::single_node("https://example.com")?;
    let client = Elasticsearch::new(transport);
    Ok(())
}

If you're running against an Elasticsearch deployment in Elastic Cloud, a client can be created using a Cloud ID and credentials retrieved from the Cloud web console

use elasticsearch::{
    auth::Credentials,
    Elasticsearch, Error,
    http::transport::Transport,
};

fn main() -> Result<(), Error> {
    let cloud_id = "cluster_name:Y2xvdWQtZW5kcG9pbnQuZXhhbXBsZSQzZGFkZjgyM2YwNTM4ODQ5N2VhNjg0MjM2ZDkxOGExYQ==";
    // can use other types of Credentials too, like Bearer or ApiKey
    let credentials = Credentials::Basic("<username>".into(), "<password>".into());
    let transport = Transport::cloud(cloud_id, credentials)?;
    let client = Elasticsearch::new(transport);
    Ok(())
}

More control over how a Transport is built can be achieved using TransportBuilder to build a transport, and passing it to Elasticsearch::new() create a new instance of Elasticsearch

use url::Url;
use elasticsearch::{
    Error, Elasticsearch,
    http::transport::{TransportBuilder,SingleNodeConnectionPool},
};

fn main() -> Result<(), Error> {
    let url = Url::parse("https://example.com")?;
    let conn_pool = SingleNodeConnectionPool::new(url);
    let transport = TransportBuilder::new(conn_pool).disable_proxy().build()?;
    let client = Elasticsearch::new(transport);
    Ok(())
}

Making API calls

The following will execute a POST request to /_search?allow_no_indices=true with a JSON body of {"query":{"match_all":{}}}

use elasticsearch::{Elasticsearch, Error, SearchParts};
use serde_json::{json, Value};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Elasticsearch::default();

    // make a search API call
    let search_response = client
        .search(SearchParts::None)
        .body(json!({
            "query": {
                "match_all": {}
            }
        }))
        .allow_no_indices(true)
        .send()
        .await?;

    // get the HTTP response status code
    let status_code = search_response.status_code();

    // read the response body. Consumes search_response
    let response_body = search_response.json::<Value>().await?;

    // read fields from the response body
    let took = response_body["took"].as_i64().unwrap();

    Ok(())
}

The client provides functions on each API builder struct for all query string parameters available for that API. APIs with multiple URI path variants, where some can contain parts parameters, are modelled as enums.

Elasticsearch also has an async send function on the root that allows sending an API call to an endpoint not represented as an API function, for example, experimental and beta APIs

use elasticsearch::{http::Method, Elasticsearch, Error, SearchParts};
use http::HeaderMap;
use serde_json::Value;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Elasticsearch::default();
    let body = b"{\"query\":{\"match_all\":{}}}";
    let response = client
        .send(
            Method::Post,
            SearchParts::Index(&["tweets"]).url().as_ref(),
            HeaderMap::new(),
            Option::<&Value>::None,
            Some(body.as_ref()),
            None,
        )
        .await?;
    Ok(())
}

License

This is free software, licensed under The Apache License Version 2.0..

Comments
  • Add bytes method to Response struct

    Add bytes method to Response struct

    This patch has a simple change to wrap the reqwest::Response::bytes() into the client Response struct. Additionally I've taken the liberty to do some cosmetic changes in the overall struct - I hope that's fine too.

    Thanks @dodomorandi for opening up the issue.

    Closes https://github.com/elastic/elasticsearch-rs/issues/160

    enhancement v7.12.0-alpha.1 
    opened by laurocaetano 9
  • [Enhancement] better error handling

    [Enhancement] better error handling

    Describe the bug A clear and concise description of what the bug is.

    bulk request if failling silently, curl works but bulk request fails and gave nothing

    To Reproduce Steps to reproduce the behavior: 1. 2. 3.

    Expected behavior A clear and concise description of what you expected to happen.

    Screenshots If applicable, add screenshots to help explain your problem.

    Environment (please complete the following information):

    • OS: [e.g. Windows 10 Pro]
    • rustc version [e.g. rustc --version]

    Additional context Add any other context about the problem here.

    enhancement 
    opened by GopherJ 9
  • [BUG] Failure in certificate validation

    [BUG] Failure in certificate validation

    Describe the bug Four tests related to certificate validation fail.

    To Reproduce Steps to reproduce the behavior:

    1. cargo test

    Expected behavior test result ok. 7 passed.

    Environment (please complete the following information):

    • Debian GNU/Linux 10 (buster)
    • rustc 1.42.0 (b8cedc004 2020-03-09)

    Additional context Add any other context about the problem here.

    running 7 tests
    test full_certificate_ca_validation ... ok
    test fail_certificate_certificate_validation ... FAILED
    test certificate_certificate_ca_validation ... ok
    test default_certificate_validation ... FAILED
    test certificate_certificate_validation ... FAILED
    test none_certificate_validation ... ok
    test full_certificate_validation ... FAILED
    
    failures:
    
    ---- fail_certificate_certificate_validation stdout ----
    Error: ErrorMessage { msg: "Expected error but response was 200 OK" }
    thread 'fail_certificate_certificate_validation' panicked at 'assertion failed: `(left == right)`
      left: `1`,
     right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure', <::std::macros::panic macros>:5:6
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    
    ---- default_certificate_validation stdout ----
    Error: ErrorMessage { msg: "Expected error but response was 200 OK" }
    thread 'default_certificate_validation' panicked at 'assertion failed: `(left == right)`
      left: `1`,
     right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure', <::std::macros::panic macros>:5:6
    
    ---- certificate_certificate_validation stdout ----
    Error: ErrorMessage { msg: "Expected error but response was 200 OK" }
    thread 'certificate_certificate_validation' panicked at 'assertion failed: `(left == right)`
      left: `1`,
     right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure', <::std::macros::panic macros>:5:6
    
    ---- full_certificate_validation stdout ----
    Error: ErrorMessage { msg: "Expected error but response was 200 OK" }
    thread 'full_certificate_validation' panicked at 'assertion failed: `(left == right)`
      left: `1`,
     right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure', <::std::macros::panic macros>:5:6
    
    
    failures:
        certificate_certificate_validation
        default_certificate_validation
        fail_certificate_certificate_validation
        full_certificate_validation
    
    test result: FAILED. 3 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out
    
    bug 
    opened by srikwit 9
  • [ENHANCEMENT] Migration to tokio 1.0

    [ENHANCEMENT] Migration to tokio 1.0

    Is your feature request related to a problem? Please describe. Since tokio 0.3 was released, it would be great to migrate, otherwise it's necessary to wrap each future in a compatibility layer.

    Describe the solution you'd like Migration to tokio 0.3. Any dependencies can be wrapped in a compatibility layer until they get updated too.

    Describe alternatives you've considered tokio-compat-02 crate.

    Additional context https://tokio.rs/blog/2020-10-tokio-0-3

    EDIT: Should now update to tokio 1.0

    enhancement 
    opened by krojew 6
  • [BUG] CA chains are not supported with native-tls

    [BUG] CA chains are not supported with native-tls

    Describe the bug Using a CA pem cert CertificateValidation::Full only supports a single certificate and breaks with CAs that require an intermediate CA.

    To Reproduce Steps to reproduce the behavior:

    1. Create an intermediate CA
    2. cat the root CA and the intermediate CA into one PEM file
    3. Create a server cert for this CA
    4. Try to connect an elasticsearch client to it

    Expected behavior Either accept an array of certs or split the PEM file into individual certs and call the underlying reqwest method multiple times.

    Environment (please complete the following information): native-tls

    bug 
    opened by reyk 6
  • Use text/plain content-type and accept headers for cat APIs

    Use text/plain content-type and accept headers for cat APIs

    This commit updates the api_generator to set text/plain content-type and accept headers by default for all cat APIs.

    It also introduces a read_body_as_text async fn on Response to be able to treat the response body as plain text

    Closes #71

    enhancement breaking-change v7.7.0-alpha.1 
    opened by russcam 6
  • [BUG] error decoding response body: missing field `<field>` at line x column y

    [BUG] error decoding response body: missing field `` at line x column y

    Describe the bug It seems that there are some problems with deserializing structs.

    *To Reproduce

    1. I created an index and pushed my structs using the following code:
    let response = client
                .index(IndexParts::IndexId(index, id))
                .body(&self)
                .send()
                .await?;
    
            Ok(response.status_code().is_success())
    
    1. I can verify in Kibana that the entities are correctly created.
    2. When I try to retrieve them using the following code:
    let mut response = client
                .get(GetParts::IndexId(index, id))
                .send()
                .await?;
    
    response.read_body().await?
    

    I receive the error error decoding response body: missing fieldat line x column y.

    The interesting part however is that if I do:

    let mut response = client
                .get(GetParts::IndexId(index, id))
                .send()
                .await?;
    
            let value: Value = response.read_body().await.unwrap();
            let value =  value.get("_source").unwrap();
            let value: Self = serde_json::from_value(value.clone()).unwrap();
            Ok(value)
    

    It can successfully decode the response.

    The struct I use has the following format:

    pub struct MyStruct
    {
        pub a: String,
        pub b: String,
        pub c: Vec<HashMap<String, String>>,
        pub d: u64,
    }
    

    The error stated that it was unable to find missing field a.

    EDIT: As a bonus I printed out the value from the second (working) example, and the JSON I printed contained all the parameters of MyStruct.

    Expected behavior Expected response.read_body() to successfully deserialize the response.

    Environment (please complete the following information):

    • OS: Windows 10 Pro
    • rustc 1.41.1 (f3e1a954d 2020-02-24)
    bug 
    opened by DevQps 6
  • BulkOperation builder implementations

    BulkOperation builder implementations

    This commit introduces a collection of builders to help with the bulk API. The bulk API accepts a collection of operations in newline delimited JSON format, where each operation is represented as a header, followed by an optional source for the operation. The builders provide functions to build each of the supported operations, exposing the metadata options available for the operation. Operations can be converted to a common Operation type which implements the Body trait.

    Closes #43

    enhancement v7.6.1-alpha.1 
    opened by russcam 6
  • [ENHANCEMENT] Add pass through features for reqwest

    [ENHANCEMENT] Add pass through features for reqwest

    In an effort to reduce dependency duplication as reqwest is a very commonly used crate; it would be handy to have some features we can pass through to reqwest.

    Some candidates are:

    • rustls-tls = ["reqwest/rustls-tls"]
    • cookies = ["reqwest/cookies"]
    • socks = ["reqwest/socks"]

    Do we need the native-tls feature specifically? It looks like it adds some more features vs. default-tls? Can rustls-tls be used instead? rusttls-tls makes building a static binary via musl libc much easier...

    enhancement 
    opened by mwilliammyers 6
  • Update to 8.3.3

    Update to 8.3.3

    This PR updates the client to 8.3.3:

    • regenerates the client using the 8.3.3 STACK_VERSION
    • updates deprecation warning test to use an API call that emits a deprecation warning in 8.x
    opened by russcam 5
  • [ENHANCEMENT] strong typed Response.

    [ENHANCEMENT] strong typed Response.

    Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when there elasticsearch-rs is not strongly typed, I cannot deserialize my response to some kind of type.

    elastic-rs has elastic-types if I rememembered correctly, cannot we port them here? Not strongly typed makes elasticsearch-rs not too many advantages over reqwest. It becomes only a wrapper of reqwest.....

    Describe the solution you'd like A clear and concise description of what you want to happen.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Additional context Add any other context or screenshots about the feature request here.

    enhancement 
    opened by GopherJ 5
  • [ENHANCEMENT] High level query builder

    [ENHANCEMENT] High level query builder

    Is your feature request related to a problem? Please describe. Not a problem, actually, but I would be way more cool, sometimes, to use builder pattern to build queries. Like it was implemented in high-level ES client for dotnet. Example: https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/writing-queries.html

    Describe the solution you'd like Usage of builder pattern, like in dotnet client:

    var searchResponse = _client.Search<Project>(s => s
        .Query(q => q
            .DateRange(r => r
                .Field(f => f.StartedOn)
                .GreaterThanOrEquals(new DateTime(2017, 01, 01))
                .LessThan(new DateTime(2018, 01, 01))
            )
        )
    );
    

    Rust

    let req = builder::new().match("querytext").aggs(agg:Terms("field")).source(false)
    

    Describe alternatives you've considered only using json! macro with the body.

    Additional context some more complex query example.

    var searchResponse = _client.Search<Project>(s => s
        .Query(q => q
            .Bool(b => b
                .Must(mu => mu
                    .Match(m => m 
                        .Field(f => f.LeadDeveloper.FirstName)
                        .Query("Russ")
                    ), mu => mu
                    .Match(m => m 
                        .Field(f => f.LeadDeveloper.LastName)
                        .Query("Cam")
                    )
                )
                .Filter(fi => fi
                     .DateRange(r => r
                        .Field(f => f.StartedOn)
                        .GreaterThanOrEquals(new DateTime(2017, 01, 01))
                        .LessThan(new DateTime(2018, 01, 01)) 
                    )
                )
            )
        )
    );
    
    enhancement 
    opened by t-smirnov 1
  • Update most dependencies

    Update most dependencies

    This PR updates most dependencies to their latest version.

    I didn't touch syn and quote because the update to v1 requires a substantial amount of reworks: simply updating the version results in multiple hundreds of errors, and fixing them is non-trivial.

    Importantly, this PR brings the dependencies of the actual main library elasticsearch completely up to date.

    Before

    $ cargo outdated -d1
    
    api_generator
    ================
    Name           Project  Compat  Latest   Kind    Platform
    ----           -------  ------  ------   ----    --------
    dialoguer      0.3.0    ---     0.10.2   Normal  ---
    indicatif      0.12.0   ---     0.17.0   Normal  ---
    path-slash     0.1.5    ---     0.2.1    Normal  ---
    quote          0.3.15   ---     1.0.21   Normal  ---
    reqwest        0.9.24   ---     0.11.11  Normal  ---
    semver         0.9.0    ---     1.0.13   Normal  ---
    simple_logger  1.16.0   ---     2.3.0    Normal  ---
    syn            0.11.11  ---     1.0.99   Normal  ---
    
    elasticsearch
    ================
    Name           Project  Compat  Latest  Kind         Platform
    ----           -------  ------  ------  ----         --------
    base64         0.11.0   ---     0.13.0  Normal       ---
    clap           2.34.0   ---     3.2.20  Development  ---
    rustc_version  0.2.3    ---     0.4.0   Build        ---
    serde_with     1.14.0   ---     2.0.0   Normal       ---
    sysinfo        0.12.0   ---     0.26.2  Development  ---
    textwrap       0.11.0   ---     0.15.0  Development  ---
    
    yaml_test_runner
    ================
    Name           Project  Compat  Latest   Kind    Platform
    ----           -------  ------  ------   ----    --------
    base64         0.11.0   ---     0.13.0   Normal  ---
    clap           2.34.0   ---     3.2.20   Normal  ---
    path-slash     0.1.5    ---     0.2.1    Normal  ---
    quote          0.3.15   ---     1.0.21   Normal  ---
    reqwest        0.9.24   ---     0.11.11  Normal  ---
    semver         0.9.0    ---     1.0.13   Normal  ---
    serde_yaml     0.8.26   ---     0.9.11   Normal  ---
    simple_logger  1.16.0   ---     2.3.0    Normal  ---
    syn            0.11.11  ---     1.0.99   Normal  ---
    sysinfo        0.9.6    ---     0.26.2   Normal  ---
    
    xtask
    ================
    Name  Project  Compat  Latest  Kind    Platform
    ----  -------  ------  ------  ----    --------
    zip   0.5.13   ---     0.6.2   Normal  ---
    

    After

    $ cargo outdated -d1
    
    api_generator
    ================
    Name   Project  Compat  Latest  Kind    Platform
    ----   -------  ------  ------  ----    --------
    quote  0.3.15   ---     1.0.21  Normal  ---
    syn    0.11.11  ---     1.0.99  Normal  ---
    
    yaml_test_runner
    ================
    Name   Project  Compat  Latest  Kind    Platform
    ----   -------  ------  ------  ----    --------
    quote  0.3.15   ---     1.0.21  Normal  ---
    syn    0.11.11  ---     1.0.99  Normal  ---
    
    opened by athre0z 0
  • Download specs and tests from GitHub when unavailable on Artifacts API

    Download specs and tests from GitHub when unavailable on Artifacts API

    This PR downloads specs and tests from GitHub when they're not available on the Artifacts API. The Artifacts API only keeps a certain number of recent versions available, making it difficult to work with older versions.

    Other changes:

    • Remove old checked in REST API specs
    • move read_api fn onto Api struct impl
    opened by russcam 1
  • Derive Clone on Bulk request structs

    Derive Clone on Bulk request structs

    Addresses https://github.com/elastic/elasticsearch-rs/issues/195

    This option is the least invasive as it doesn't change the type signatures although it requires extra allocations in order to clone the struct. Allowing body to take a reference to a slice of operations instead of ownership would be a more efficient solution that could be addressed in a separate PR

    opened by jefftt 4
Releases(v8.4.0-alpha.1)
  • v8.4.0-alpha.1(Sep 1, 2022)

  • v7.14.0-alpha.1(Sep 8, 2021)

  • v7.12.1-alpha.1(Jun 29, 2021)

  • v7.12.0-alpha.1(Apr 2, 2021)

  • v7.11.0-alpha.1(Feb 18, 2021)

  • v7.10.1-alpha.1(Jan 27, 2021)

  • v7.10.0-alpha.1(Nov 13, 2020)

    https://github.com/elastic/elasticsearch-rs/compare/v7.9.0-alpha.1...v7.10.0-alpha.1

    Documentation & Examples

    • #150 [DOCS] Reorganizes Overview and Installation chapters

    Features & Enhancements

    • #134 Avoid generating unneeded #[serde(rename)]
    • #136 Update CI to use cargo make
    • #138 Simplify generated code module structure

    View the full list of issues and PRs

    Source code(tar.gz)
    Source code(zip)
  • v7.9.0-alpha.1(Aug 18, 2020)

    https://github.com/elastic/elasticsearch-rs/compare/v7.8.1-alpha.1...v7.9.0-alpha.1

    Features & Enhancements

    • #118 Add ElasticsearchException to model Elasticsearch exceptions (issue: #112)
    • #121 Update rest specs to 7.9 and regenerate client
    • #127 Expose dangling indices APIs
    • #132 Add support for global and per call request timeouts (issue: #116)

    Breaking Changes

    • #132 Add support for global and per call request timeouts (issue: #116)

      The addition of per API call timeouts has added an additional timeout parameter to the Transport send function, which is a breaking change if you are using this function directly for beta or experimental APIs. This function is likely to be refactored in the future (see #132)

    View the full list of issues and PRs

    Source code(tar.gz)
    Source code(zip)
  • v7.8.1-alpha.1(Jul 20, 2020)

    https://github.com/elastic/elasticsearch-rs/compare/v7.8.0-alpha.1...v7.8.1-alpha.1

    Features & Enhancements

    • #117 Add Debug impl for Response (issue: #113)
    • #119 Return warning description only from warning headers
    • #124 Update rest specs to 7.8 and regenerate client

    Bug Fixes

    • #114 Make _id optional on Bulk index operation

    Breaking Changes

    • #114 Make _id optional on Bulk index operation

    CI & testing

    • #125 Rename CI certificates

    Uncategorized

    • #115 Remove unnecessary default-tls feature (issue: #111) - thanks @mwilliammyers 👍

    View the full list of issues and PRs

    Source code(tar.gz)
    Source code(zip)
  • v7.8.0-alpha.1(Jun 18, 2020)

    https://github.com/elastic/elasticsearch-rs/compare/v7.7.1-alpha.1...v7.8.0-alpha.1

    Features & Enhancements

    • #106 Update REST specs to 7.8

    Documentation & Examples

    • #103 Add Examples directory

    CI & testing

    • #108 Add CI jobs and scripts
    • #109 Emit yaml test junit output

    Breaking Changes

    • #107 Pass Transport to builder structs

    View the full list of issues and PRs

    Source code(tar.gz)
    Source code(zip)
  • v7.7.1-alpha.1(May 29, 2020)

    https://github.com/elastic/elasticsearch-rs/compare/v7.7.0-alpha.1...v7.7.1-alpha.1

    Features & Enhancements

    • #95 Encode values passed to Parts enums
    • #96 Add method, url, content_length and content_type to Response (issue: #6)
    • #98 Add yaml test runner project (issue: #19)
    • #101 Add Certificate newtype that supports CA chains. (issue: #100) thanks @reyk 👍

    Breaking Changes

    • #101 Add Certificate newtype that supports CA chains. (issue: #100)

      This introduces a new Certificate struct to the library that can handle PEM encoded certificate chains. Previously, CertificateValidation::Full(Certificate) and CertificateValidation::Certificate(Certificate) took a reqwest::Certificate. Now, they take the library Certificate struct.

    Uncategorized

    • #94 Add license headers and NOTICE.txt

    View the full list of issues and PRs

    Source code(tar.gz)
    Source code(zip)
  • v7.7.0-alpha.1(Apr 21, 2020)

    https://github.com/elastic/elasticsearch-rs/compare/v7.6.1-alpha.1...v7.7.0-alpha.1

    Highlights

    elasticsearch crate now compiles on stable channel! Rust nightly is required only to run doc tests against README.md, which are conditionally included when compiling with nightly.

    The read_body() fn on Response has been renamed to json. With the introduction of a read_body_as_text() fn to read the body as plain text, the function names were overly verbose. The renames to json and text better align with what each returns, respectiviely.

    Features & Enhancements

    • #72 Use text/plain content-type and accept headers for cat APIs (issue: #71)
    • #81 Update to 7.7 rest specs
    • #85 Add default global HTTP headers (issue: #83)
    • #88 Add deprecation warning headers
    • #89 Allow elasticsearch to work with rust stable (issue: #87)

    Breaking Changes

    • #72 Use text/plain content-type and accept headers for cat APIs (issue: #71)
    • #84 Rename read_body and read_body_as_text (issue: #74)

    Documentation

    • #73 Add markdown examples into generated client (issues: #66, #67)
    • #82 Add note about tokio runtime (issue: #80)
    • #92 Making changes to main and Build error in parsing response (issue: #91). thanks @srikwit 👍

    View the full list of issues and PRs

    Source code(tar.gz)
    Source code(zip)
  • v7.6.1-alpha.1(Mar 13, 2020)

    https://github.com/elastic/elasticsearch-rs/compare/v7.6.0-alpha.1...v7.6.1-alpha.1

    Features & Enhancements

    • #46 Add error_for_status_code methods to Response (issue: #28) thanks @mwilliammyers 👍
    • #56 BulkOperation builder implementations (issue: #43)
    • #60 Add Certificate validation (issue: #55)
    • #68 Provide native-tls and rustls-tls features (issue: #44)
    • #69 Generate client from v7.6.1 REST API specs

    View the full list of issues and PRs

    Source code(tar.gz)
    Source code(zip)
  • v7.6.0-alpha.1(Feb 12, 2020)

    Features

    • #58 Update specs to 7.6.0 and generate client

    Docs

    • #53 Document client functions and update links in docs to point to correct {major}.{minor} version on Elastic website.
    Source code(tar.gz)
    Source code(zip)
  • v7.5.2-alpha.1(Jan 23, 2020)

    Features

    • #52 Model track_total_hits as enum
    • #42 Update Body trait so that you can pass any &'a impl Body, and give Bytes a way to set the request body without having to do any copying. Thanks @KodrAus 👍
    • #49 Implement Sync and Send on ConnectionPool trait. Thanks @iostat 👍
    • #41 Make the top level Error type opaque. Thanks @KodrAus 👍

    Bug fixes

    • #48 Support base urls with paths (#50)

    Misc

    • #51 Update to v7.5.2 rest specs
    • #45 Relax dependency versions. Thanks @mwilliammyers 👍
    • #40 Update objekt dependency to dyn-clone. Thanks @bryantbiggs 👍
    Source code(tar.gz)
    Source code(zip)
  • v7.5.1-alpha.1(Feb 12, 2020)

🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.

?? Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.

Valerian Saliou 17.4k Jan 2, 2023
A Solr 8+ Client for Rust and Python

Solrstice: A Solr 8+ Client for Rust and Python Solrstice is a SolrCloud aware client library written in rust. It also provides a wrapper to python. U

Andreas H Johansen 4 Aug 26, 2023
EasyAlgolia is a Rust crate designed for utilizing the Algolia admin client. It simplifies the process of updating and inserting documents into Algolia's search index.

crate link EasyAlgolia is a Rust crate designed for utilizing the Algolia admin client. It simplifies the process of updating and inserting documents

faizal khan 3 Mar 20, 2024
Tantivy is a full-text search engine library inspired by Apache Lucene and written in Rust

Tantivy is a full text search engine library written in Rust. It is closer to Apache Lucene than to Elasticsearch or Apache Solr in the sense it is no

tantivy 7.4k Dec 28, 2022
A full-text search and indexing server written in Rust.

Bayard Bayard is a full-text search and indexing server written in Rust built on top of Tantivy that implements Raft Consensus Algorithm and gRPC. Ach

Bayard Search 1.8k Dec 26, 2022
AI-powered search engine for Rust

txtai: AI-powered search engine for Rust txtai executes machine-learning workflows to transform data and build AI-powered text indices to perform simi

NeuML 69 Jan 2, 2023
A full-text search engine in rust

Toshi A Full-Text Search Engine in Rust Please note that this is far from production ready, also Toshi is still under active development, I'm just slo

Toshi Search 3.8k Jan 7, 2023
🐎 Daac Horse: Double-Array Aho-Corasick in Rust

?? daachorse Daac Horse: Double-Array Aho-Corasick Overview A fast implementation of the Aho-Corasick algorithm using Double-Array Trie. Examples use

null 140 Dec 16, 2022
Searching for plain-text files for lines that match a given string. Built with Rust.

Getting Started This is a minimal grep command-line utility built on Rust. It provides searching for plain-text files for lines that match a given str

Harsh Karande 0 Dec 31, 2021
A Rust API search engine

Roogle Roogle is a Rust API search engine, which allows you to search functions by names and type signatures. Progress Available Queries Function quer

Roogle 342 Dec 26, 2022
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
Message authentication code algorithms written in pure Rust

RustCrypto: Message Authentication Codes Collection of Message Authentication Code (MAC) algorithms written in pure Rust. Supported Algorithms Algorit

Rust Crypto 155 Dec 31, 2022
Experimenting with Rust implementations of IP address lookup algorithms.

This repository contains some very rough experimentation with Rust implementations of IP address lookup algorithms, both my own and comparison with th

Ximon Eighteen 0 Jan 10, 2022
An example of web application by using Rust and Axum with Clean Architecture.

stock-metrics Stock price and stats viewer. Getting Started Middleware Launch the middleware by executing docker compose: cd local-middleware docker c

Yuki Toyoda 62 Dec 10, 2022
2 and 3-dimensional collision detection library in Rust.

2D Documentation | 3D Documentation | User Guide | Forum ⚠️ **This crate is now passively-maintained. It is being superseded by the Parry project.** ⚠

dimforge 914 Dec 24, 2022
Shogun search - Learning the principle of search engine. This is the first time I've written Rust.

shogun_search Learning the principle of search engine. This is the first time I've written Rust. A search engine written in Rust. Current Features: Bu

Yuxiang Liu 5 Mar 9, 2022
Image search example by approximate nearest-neighbor library In Rust

rust-ann-search-example Image search example by approximate nearest-neighbor library In Rust use - tensorflow 0.17.0 - pretrain ResNet50 - hora (Ru

vaaaaanquish 8 Jan 3, 2022
Simplified Find command made with Rust.

Hunt Hunt is a (highly-opinionated) simplified Find command made with Rust. It searches a file/folder by name on the entire drive. If the --first flag

LyonSyonII 65 Jan 4, 2023
Tantivy is a full text search engine library written in Rust.

Tantivy is a full text search engine library written in Rust. It is closer to Apache Lucene than to Elasticsearch or Apache Solr in the sense it is no

Quickwit OSS 7.4k Dec 30, 2022