2018-05-05 10:18:23 +02:00
|
|
|
# raptor-rs
|
|
|
|
Raptor, the new RISE
|
2018-09-15 21:25:04 +02:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
First you need to generate the index files.
|
|
|
|
|
|
|
|
```bash
|
2018-10-04 13:55:29 +02:00
|
|
|
$ cargo build --release
|
|
|
|
$ time ./target/release/raptor-cli index csv --stop-words stop-words.txt the-csv-file.csv
|
2018-09-15 21:25:04 +02:00
|
|
|
```
|
|
|
|
|
2018-10-04 13:55:29 +02:00
|
|
|
The `stop-words.txt` file here is a simple file that contains one stop word by line.
|
|
|
|
|
2018-09-15 21:25:04 +02:00
|
|
|
Once the command finished indexing you will have 3 files that compose the index:
|
|
|
|
- The `xxx.map` represent the fst map.
|
|
|
|
- The `xxx.idx` represent the doc indexes matching the words in the map.
|
|
|
|
- The `xxx.sst` is a file that contains all the fields and the values asociated with it, it is passed to the internal RocksDB.
|
|
|
|
|
2018-10-04 13:55:29 +02:00
|
|
|
Now you can easily use `raptor server console` or `raptor serve http` with the name of the dump. (e.g. relaxed-colden).
|
2018-09-15 21:25:04 +02:00
|
|
|
|
|
|
|
```bash
|
2018-10-04 13:55:29 +02:00
|
|
|
$ cargo build --release --default-features --features serve-console
|
|
|
|
$ ./target/release/raptor-cli serve console --stop-words stop-words.txt relaxed-colden
|
2018-09-15 21:25:04 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Note: If you have performance issues run the searcher in release mode (i.e. `--release`).
|