Files
rust-tantivy-search/README.md
T
2026-09-07 00:26:49 +02:00

24 lines
491 B
Markdown

# 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:
```bash
mkdir index
cargo run -- index
```
## Search
Afterwards you can search in the index.
It will return a score and the result as JSON.
```bash
cargo run -- search "jazz music"
[3.699133] {"description":["Jazzy music with some rainy atmosphere"],"id":["0004"],"title":["I am currently listening to Jazz"]}
```