1919
2020cmake_minimum_required (VERSION 3.22 )
2121# 3.22 is the minimum required by Corrosion-rs (used for the Rust<->C++ FFI
22- # integration, see crates/tantivy_ffi ). Ubuntu 24.04 ships CMake 3.28 and
22+ # integration, see crates/lance_ffi ). Ubuntu 24.04 ships CMake 3.28 and
2323# CentOS 8+/RHEL 9+ ship 3.20+, so older distributions need a newer CMake
2424# installation.
2525message (STATUS "Building using CMake version: ${CMAKE_VERSION } " )
@@ -69,8 +69,8 @@ option(PAIMON_ENABLE_NETWORK_TESTS
6969 "Whether to enable tests that access real remote services over the network" OFF )
7070option (PAIMON_ENABLE_LUMINA "Whether to enable lumina vector index" OFF )
7171option (PAIMON_ENABLE_LUCENE "Whether to enable lucene index" OFF )
72- option (PAIMON_ENABLE_TANTIVY
73- "Whether to enable tantivy-fulltext global index (Rust FFI, experimental)" OFF )
72+ option (PAIMON_ENABLE_FULL_TEXT
73+ "Whether to enable full-text global index (Rust FFI, experimental)" OFF )
7474option (PAIMON_ENABLE_REST
7575 "Whether to enable the rest catalog (requires libcurl and OpenSSL)" OFF )
7676if (PAIMON_ENABLE_ORC)
@@ -126,8 +126,8 @@ if(PAIMON_ENABLE_LUCENE)
126126 add_definitions (-DPAIMON_ENABLE_LUCENE )
127127endif ()
128128
129- if (PAIMON_ENABLE_TANTIVY )
130- add_definitions (-DPAIMON_ENABLE_TANTIVY )
129+ if (PAIMON_ENABLE_FULL_TEXT )
130+ add_definitions (-DPAIMON_ENABLE_FULL_TEXT )
131131endif ()
132132
133133add_definitions (-DSNAPPY_CODEC_AVAILABLE )
@@ -333,7 +333,7 @@ add_subdirectory(third_party/roaring_bitmap EXCLUDE_FROM_ALL)
333333add_subdirectory(third_party/xxhash EXCLUDE_FROM_ALL)
334334
335335# ---- Rust FFI crates via Corrosion-rs -------------------------------------------
336- if(PAIMON_ENABLE_LANCE OR PAIMON_ENABLE_TANTIVY )
336+ if(PAIMON_ENABLE_LANCE)
337337 include(CorrosionFetch)
338338endif()
339339
@@ -346,13 +346,6 @@ if(PAIMON_ENABLE_LANCE)
346346 corrosion_set_env_vars(paimon_lance_ffi " PROTOC=${PAIMON_LANCE_PROTOC} ")
347347endif()
348348
349- if(PAIMON_ENABLE_TANTIVY)
350- corrosion_import_crate(MANIFEST_PATH crates/tantivy_ffi/Cargo.toml CRATES
351- paimon_tantivy_ffi)
352- corrosion_experimental_cbindgen(TARGET paimon_tantivy_ffi HEADER_NAME
353- paimon_tantivy_ffi.h)
354- endif()
355-
356349if(PAIMON_ENABLE_LUCENE)
357350 set(PAIMON_DICT_DEST " share/paimon/dict ")
358351
@@ -532,6 +525,13 @@ if(PAIMON_BUILD_TESTS)
532525 paimon_lucene_index_shared)
533526 list(APPEND TEST_STATIC_LINK_LIBS ${TEST_PLUGIN_LINK_LIBS} )
534527 endif()
528+ if(PAIMON_ENABLE_FULL_TEXT)
529+ paimon_link_libraries_whole_archive(PAIMON_FULL_TEXT_INDEX_STATIC_LINK_LIBS
530+ paimon_full_text_index_static)
531+ paimon_link_libraries_no_as_needed(TEST_PLUGIN_LINK_LIBS
532+ paimon_full_text_index_shared)
533+ list(APPEND TEST_STATIC_LINK_LIBS ${TEST_PLUGIN_LINK_LIBS} )
534+ endif()
535535endif()
536536
537537if(PAIMON_BUILD_BENCHMARKS)
@@ -586,8 +586,8 @@ if(PAIMON_ENABLE_LUMINA)
586586 add_subdirectory(src/paimon/indexer/lumina)
587587endif()
588588add_subdirectory(src/paimon/global_index/lucene)
589- if(PAIMON_ENABLE_TANTIVY )
590- add_subdirectory(src/paimon/global_index/tantivy )
589+ if(PAIMON_ENABLE_FULL_TEXT )
590+ add_subdirectory(src/paimon/global_index/full_text )
591591endif()
592592add_subdirectory(src/paimon/testing/mock)
593593add_subdirectory(src/paimon/testing/utils)
0 commit comments