feat: initial commit.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# 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"]}
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user