Giter Site home page Giter Site logo

dingodb / tantivy-search Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ketor/tantivy-search

0.0 0.0 2.0 1.08 MB

Tantivy c++ wrapper for DingoDB

License: Apache License 2.0

Shell 0.37% C++ 26.11% Python 0.44% C 0.35% Rust 70.21% CMake 2.52%

tantivy-search's Introduction

Tantivy Search

This library is designed to integrate tantivy into DingoDB.

Development

All FFI (Foreign Function Interface) functions are exposed in lib.rs. Developers need to regenerate the header file after making any changes to the relevant code:

cbindgen . -o include/tantivy_search_cbindgen.h --config cbindgen.toml
cxxbridge src/lib.rs --header > include/tantivy_search_cxx.h

Developers can use gen-cxx-header.sh to do this too.

If developers do not add, delete, or modify the names of FFI functions, there is no need to execute the above command.

If developers do not have cbindgen or cxxbridge, install like this:

cargo install cbindgen
cargo install cxxbridge-cmd

Work in progress

  • Added unit tests in C++ to test Rust FFI functions.
  • 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:

cargo build --release

If you need to test FFI function in C++, run:

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:

cargo test

Here is an example to run unit test in C++:

cd build/tests/unit_test
./unit_test

Credits

We give special thanks for these open-source projects, upon which we have developed:

  • Tantivy - A library for full-text search.
  • tantivy-search - A library is designed to integrate tantivy into ClickHouse and MyScaleDB.
  • cang-jie - A Chinese tokenizer for tantivy, based on jieba-rs.

tantivy-search's People

Contributors

mochixu avatar ketor avatar lqhl avatar chuandew avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.