491 B
491 B
Search with tantivy
This demo takes the base_data.yml, indexes it and provides a search in this data.
Index
Create an index directory and then execute the indexing:
mkdir index
cargo run -- index
Search
Afterwards you can search in the index. It will return a score and the result as JSON.
cargo run -- search "jazz music"
[3.699133] {"description":["Jazzy music with some rainy atmosphere"],"id":["0004"],"title":["I am currently listening to Jazz"]}