Skip to content

Commit 3587aeb

Browse files
committed
fix
1 parent 07326a4 commit 3587aeb

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/paimon/global_index/lucene/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ if(PAIMON_ENABLE_LUCENE)
4242
SHARED_LINK_FLAGS
4343
${PAIMON_VERSION_SCRIPT_FLAGS})
4444

45-
if(PAIMON_BUILD_TESTS)
46-
target_compile_definitions(paimon_lucene_index_objlib
47-
PRIVATE JIEBA_TEST_DICT_DIR="${JIEBA_DICT_DIR}")
48-
endif()
4945
if(PAIMON_BUILD_TESTS)
5046
add_paimon_test(lucene_index_test
5147
SOURCES
@@ -65,5 +61,8 @@ if(PAIMON_ENABLE_LUCENE)
6561
paimon_lucene_index_static
6662
"-Wl,--no-whole-archive"
6763
${GTEST_LINK_TOOLCHAIN})
64+
target_compile_definitions(paimon-lucene-index-test
65+
PUBLIC JIEBA_TEST_DICT_DIR="${JIEBA_DICT_DIR}")
66+
6867
endif()
6968
endif()

src/paimon/global_index/lucene/jieba_analyzer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class JiebaTokenizer : public Lucene::Tokenizer {
5353
static void CutWithMode(const std::string& tokenize_mode, const cppjieba::Jieba* jieba,
5454
const std::string& str, std::vector<std::string>* terms_ptr);
5555

56-
// inplace to lower to avoid data copy
56+
// In-place converts each string in `input` to lowercase to avoid data copying.
5757
static void Normalize(const std::unordered_set<std::string>& stop_words,
5858
std::vector<std::string>* input, std::vector<std::string_view>* output);
5959

0 commit comments

Comments
 (0)