https://github.com/myscale/tantivy-search
Tantivy-search is a C++ wrapper for Tantivy, a full-text search engine written in Rust. It is designed to integrate with MyScaleDB and ClickHouse.
https://github.com/myscale/tantivy-search
clickhouse cpp myscale myscaledb rust search-engine
Last synced: 5 months ago
JSON representation
Tantivy-search is a C++ wrapper for Tantivy, a full-text search engine written in Rust. It is designed to integrate with MyScaleDB and ClickHouse.
- Host: GitHub
- URL: https://github.com/myscale/tantivy-search
- Owner: myscale
- Created: 2023-10-31T03:47:45.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-27T09:43:32.000Z (over 1 year ago)
- Last Synced: 2024-11-27T10:32:12.395Z (over 1 year ago)
- Topics: clickhouse, cpp, myscale, myscaledb, rust, search-engine
- Language: Rust
- Homepage: https://myscale.com
- Size: 1.15 MB
- Stars: 12
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tantivy Search
[]()
[](https://git.moqi.ai/mqdb/tantivy-search/-/pipelines?page=1&scope=all&ref=master)
[](https://codecov.io/gh/MochiXu/tantivy-search)
This library is designed to integrate [tantivy](https://github.com/quickwit-oss/tantivy/) into [ClickHouse](https://github.com/ClickHouse/ClickHouse) and [MyScaleDB](https://github.com/myscale/myscaledb).
## Development
All FFI (Foreign Function Interface) functions are exposed in [lib.rs](./src/lib.rs). Developers need to regenerate the header file after making any changes to the relevant code:
```bash
cbindgen . -o include/tantivy_search_cbindgen.h --config cbindgen.toml
cxxbridge src/lib.rs --header > include/tantivy_search_cxx.h
```
If developers do not add, delete, or modify the names of FFI functions, there is no need to execute the above command.
## Work in progress
- [x] Added unit tests in C++ to test Rust FFI functions.
- [x] Add additional unit tests within Rust FFI functions.
- [ ] Refactor the `tantivy_search` code using object-oriented principles.
## How to build?
You can use `cargo` to build this library, use this command:
```bash
cargo build --release
```
If you need to test FFI function in C++, run:
```bash
mkdir build
cd build && cmake ..
make -j
```
You can use `vscode` or other compilers to make the build process more elegant.
## How to test?
Test in Rust:
```bash
cargo test
```
Here is an example to run unit test in C++:
```bash
cd build/tests/unit_test
./unit_test
```