LocalSearch

September 8, 2023 ยท View on GitHub

LocalSearch is a client-side full-text library.

  • Written in Rust and intended to run in WASM.

  • Able to index and search through 20 000 film titles in a few milliseconds.

  • Leverages crates fst and fxhash for maximum performance.

  • Tested with the Rust framework Seed - see /test_app.

  • Supports autocomplete.

  • Integrates tf-idf & Levenshtein algorithms, edit distance & prefix boosting and some other technics to improve scoring.


Live Demo

  • Is deployed manually to Netlify.

  • It's the release build of /test_app.

  • How to use it:

    1. Click the button Download & Deserialize. (The first download is usually slow because the dataset with 20k films isn't cached either by Netlify or by the browser.)
    2. Click Index
    3. Write a title name into the field Query - e.g. office

Development

Run unit and doc tests by $ cargo test from the project root. And then $ cargo fmt --all.

Please, test your changes manually in /test_app (see its README for more info). And don't forget to run cargo make verify in /test_app to format and lint the project before the push.


built with love and serious coding skills by the Stremio Team