mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2025-12-27 04:29:58 +00:00
Update README (#1804)
Some parts are outdated For the debugging tutorial, debugging is really easy now with VSCode, and there are plenty of other sources for debugging rust
This commit is contained in:
45
README.md
45
README.md
@@ -41,7 +41,7 @@ Your mileage WILL vary depending on the nature of queries and their load.
|
|||||||
- SIMD integer compression when the platform/CPU includes the SSE2 instruction set
|
- SIMD integer compression when the platform/CPU includes the SSE2 instruction set
|
||||||
- Single valued and multivalued u64, i64, and f64 fast fields (equivalent of doc values in Lucene)
|
- Single valued and multivalued u64, i64, and f64 fast fields (equivalent of doc values in Lucene)
|
||||||
- `&[u8]` fast fields
|
- `&[u8]` fast fields
|
||||||
- Text, i64, u64, f64, dates, and hierarchical facet fields
|
- Text, i64, u64, f64, dates, ip, bool, and hierarchical facet fields
|
||||||
- Compressed document store (LZ4, Zstd, None, Brotli, Snap)
|
- Compressed document store (LZ4, Zstd, None, Brotli, Snap)
|
||||||
- Range queries
|
- Range queries
|
||||||
- Faceted search
|
- Faceted search
|
||||||
@@ -80,56 +80,21 @@ There are many ways to support this project.
|
|||||||
# Contributing code
|
# Contributing code
|
||||||
|
|
||||||
We use the GitHub Pull Request workflow: reference a GitHub ticket and/or include a comprehensive commit message when opening a PR.
|
We use the GitHub Pull Request workflow: reference a GitHub ticket and/or include a comprehensive commit message when opening a PR.
|
||||||
|
Feel free to update CHANGELOG.md with your contribution.
|
||||||
|
|
||||||
## Tokenizer
|
## Tokenizer
|
||||||
|
|
||||||
When implementing a tokenizer for tantivy depend on the `tantivy-tokenizer-api` crate.
|
When implementing a tokenizer for tantivy depend on the `tantivy-tokenizer-api` crate.
|
||||||
|
|
||||||
## Minimum supported Rust version
|
|
||||||
|
|
||||||
Tantivy currently requires at least Rust 1.62 or later to compile.
|
|
||||||
|
|
||||||
## Clone and build locally
|
## Clone and build locally
|
||||||
|
|
||||||
Tantivy compiles on stable Rust.
|
Tantivy compiles on stable Rust.
|
||||||
To check out and run tests, you can simply run:
|
To check out and run tests, you can simply run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/quickwit-oss/tantivy.git
|
git clone https://github.com/quickwit-oss/tantivy.git
|
||||||
cd tantivy
|
cd tantivy
|
||||||
cargo build
|
cargo test
|
||||||
```
|
|
||||||
|
|
||||||
## Run tests
|
|
||||||
|
|
||||||
Some tests will not run with just `cargo test` because of `fail-rs`.
|
|
||||||
To run the tests exhaustively, run `./run-tests.sh`.
|
|
||||||
|
|
||||||
## Debug
|
|
||||||
|
|
||||||
You might find it useful to step through the programme with a debugger.
|
|
||||||
|
|
||||||
### A failing test
|
|
||||||
|
|
||||||
Make sure you haven't run `cargo clean` after the most recent `cargo test` or `cargo build` to guarantee that the `target/` directory exists. Use this bash script to find the name of the most recent debug build of Tantivy and run it under `rust-gdb`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
find target/debug/ -maxdepth 1 -executable -type f -name "tantivy*" -printf '%TY-%Tm-%Td %TT %p\n' | sort -r | cut -d " " -f 3 | xargs -I RECENT_DBG_TANTIVY rust-gdb RECENT_DBG_TANTIVY
|
|
||||||
```
|
|
||||||
|
|
||||||
Now that you are in `rust-gdb`, you can set breakpoints on lines and methods that match your source code and run the debug executable with flags that you normally pass to `cargo test` like this:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$gdb run --test-threads 1 --test $NAME_OF_TEST
|
|
||||||
```
|
|
||||||
|
|
||||||
### An example
|
|
||||||
|
|
||||||
By default, `rustc` compiles everything in the `examples/` directory in debug mode. This makes it easy for you to make examples to reproduce bugs:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
rust-gdb target/debug/examples/$EXAMPLE_NAME
|
|
||||||
$ gdb run
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Companies Using Tantivy
|
# Companies Using Tantivy
|
||||||
|
|||||||
Reference in New Issue
Block a user