#sdk #progress #milvus

milvus-sdk-rust

官方 Milvus Rust SDK

1 个不稳定版本

0.1.0 2023 年 5 月 23 日

#1262数据结构

Download history 102/week @ 2024-03-13 81/week @ 2024-03-20 49/week @ 2024-03-27 109/week @ 2024-04-03 86/week @ 2024-04-10 38/week @ 2024-04-17 37/week @ 2024-04-24 37/week @ 2024-05-01 50/week @ 2024-05-08 86/week @ 2024-05-15 98/week @ 2024-05-22 179/week @ 2024-05-29 109/week @ 2024-06-05 96/week @ 2024-06-12 91/week @ 2024-06-19 123/week @ 2024-06-26

每月 449 次下载
用于 2 crates

自定义许可证

760KB
17K SLoC

Go 11K SLoC // 0.0% comments Rust 6K SLoC // 0.0% comments Shell 56 SLoC // 0.2% comments

Milvus Rust SDK

Milvus 的 Rust SDK。

此项目仍在进行中,请谨慎在生产中使用

入门

连接到 milvus 服务并创建集合

#[tokio::main]
async fn main() -> Result<(), Error> {
    const URL: &str = "https://127.0.0.1:19530";

    let client = Client::new(URL).await?;

    let schema =
        CollectionSchemaBuilder::new("hello_milvus", "a guide example for milvus rust SDK")
            .add_field(FieldSchema::new_primary_int64(
                "id",
                "primary key field",
                true,
            ))
            .add_field(FieldSchema::new_float_vector(
                DEFAULT_VEC_FIELD,
                "feature field",
                256,
            ))
            .build()?;
    let collection = client.create_collection(schema.clone(), None).await?;
    Ok(())
}

依赖项

~13–25MB
~447K SLoC