#search-index #simplifies #admin #process #document #updating #inserting

EasyAlgolia

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.

5 stable releases

1.0.4 Mar 16, 2024
1.0.1 Mar 15, 2024

#125 in Procedural macros

Download history 168/week @ 2024-03-10 74/week @ 2024-03-17 54/week @ 2024-03-31

63 downloads per month

MIT license

29KB
494 lines

crate link

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.

Alt text

This crate is still in development

Usage

    #[tokio::main]
    async fn main() -> Result<(), EasyAlgoliaError> {
        dotenv().ok();
        let client = ClientBuilder::build_from_env()?;
        // for raw values, Object ids are provided from algolia or can be explicitly put into json document
        let data = serde_json::json!({
            "name":" Hello world ! ",
            "about":" i love rust " ,
            "objectID" : "123456"
        });

        let my_index: Index = "Test".into();
        client.put_document_async(&my_index, data).await?;
        Ok(())
}

todo

Admin API key Curd operation

Delete by Query

Get Objects from Index

Dependencies

~4–17MB
~253K SLoC