indexrs

A simple, inefficient multi-language search index.

Usage

let mut idx = InvertIndex::<&str>::default();

idx.insert_bounded("chickity", "中ity中國,這中華的雞");
idx.insert_bounded("kurosawa", "like 黒沢 I make mad films");
idx.insert_bounded(
    "sushi",
    "I like the 寿司 'cause it's never touched a frying pan",
);

assert_eq!(idx.query_bounded("寿司")[0], "sushi");
assert_eq!(idx.query_bounded("黒沢")[0], "kurosawa");
assert_eq!(idx.query_bounded("中華的雞")[0], "chickity");