doc: Add indexation and search usage instructions

This commit is contained in:
Clément Renault 2018-09-15 21:25:04 +02:00
parent 626f69737e
commit 2484ef80bc
3 changed files with 25 additions and 2 deletions

View File

@ -1,2 +1,25 @@
# raptor-rs # raptor-rs
Raptor, the new RISE Raptor, the new RISE
## Usage
First you need to generate the index files.
```bash
$ cargo build --release --bin raptor-indexer
$ time ./target/release/raptor-indexer products.json_lines
```
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.
Now you can easily use `raptor-search` or `raptor-http` with only the prefix name of the files. (e.g. relaxed-colden).
```bash
$ cargo run --bin raptor-search -- relaxed-colden
$ cargo run --bin raptor-http -- relaxed-colden
```
Note: If you have performance issues run the searcher in release mode (i.e. `--release`).

View File

@ -81,7 +81,7 @@ where M: AsRef<Metadata>,
} }
fn main() { fn main() {
let name = env::args().nth(1).expect("Missing meta file name (e.g. lucid-ptolemy)"); let name = env::args().nth(1).expect("Missing meta file name (e.g. relaxed-colden)");
let map_file = format!("{}.map", name); let map_file = format!("{}.map", name);
let idx_file = format!("{}.idx", name); let idx_file = format!("{}.idx", name);
let sst_file = format!("{}.sst", name); let sst_file = format!("{}.sst", name);

View File

@ -46,7 +46,7 @@ fn search(metadata: &Metadata, database: &DB, common_words: &CommonWords, query:
} }
fn main() { fn main() {
let name = env::args().nth(1).expect("Missing meta file name (e.g. lucid-ptolemy)"); let name = env::args().nth(1).expect("Missing meta file name (e.g. relaxed-colden)");
let map_file = format!("{}.map", name); let map_file = format!("{}.map", name);
let idx_file = format!("{}.idx", name); let idx_file = format!("{}.idx", name);
let sst_file = format!("{}.sst", name); let sst_file = format!("{}.sst", name);