1 unstable release

0.1.0 Nov 19, 2023

#34 in #tantivy

44 downloads per month

Apache-2.0

21KB
375 lines

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
}

Dependencies

~0.6–1.1MB
~25K SLoC