tantivy-macro

Crates.iotantivy-macro
lib.rstantivy-macro
version0.1.0
sourcesrc
created_at2023-11-19 09:05:26.61327
updated_at2023-11-19 09:05:26.61327
descriptionderive tantivy schema api
homepage
repositoryhttps://github.com/thlstsul/tantivy-macro
max_upload_size
id1041028
size32,003
THELOSTSOUL (thlstsul)

documentation

README

Derive schema function return tantivy::schema::Schema; And impl into tantivy::schema::Document.

#[derive(Schema)]
pub struct Doc {
    #[field(name = "str", stored, indexed)]
    text: String,
    #[field(fast, norm, coerce, indexed)]
    num: u64,
    #[field(stored, indexed, fast)]
    date: DateTime,
    #[field(stored, indexed)]
    facet: Facet,
    #[field(stored, indexed)]
    bytes: Vec<u8>,
    #[field(stored, indexed)]
    json: Map<String, Value>,
    #[field(fast, indexed)]
    ip: Ipv6Addr
}
Commit count: 1

cargo fmt