This is an automated email from the ASF dual-hosted git repository.

JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 4b8e50df31 [build] Bump paimon-full-text-index to 0.2.0 (#11038)
4b8e50df31 is described below

commit 4b8e50df3178f15ccafe6c76cf2b543229b8f4e1
Author: Jingsong Lee <[email protected]>
AuthorDate: Mon Nov 9 13:22:09 2026 +0800

    [build] Bump paimon-full-text-index to 0.2.0 (#11038)
---
 .../index/NativeFullTextGlobalIndexTest.java       | 42 ++++++++++++++++++++++
 pom.xml                                            |  2 +-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git 
a/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativeFullTextGlobalIndexTest.java
 
b/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativeFullTextGlobalIndexTest.java
index 95aef7449f..7f11936b4b 100644
--- 
a/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativeFullTextGlobalIndexTest.java
+++ 
b/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativeFullTextGlobalIndexTest.java
@@ -204,6 +204,48 @@ public class NativeFullTextGlobalIndexTest {
         }
     }
 
+    @Test
+    public void testIcuSplitTokenizerFindsChineseWordsAndIdentifierParts() 
throws IOException {
+        Options options = new Options();
+        options.set("full-text.tokenizer", "icu/split");
+        options.set("full-text.stem", "false");
+        options.set("full-text.remove-stop-words", "false");
+
+        List<ResultEntry> results;
+        try (NativeFullTextGlobalIndexWriter writer =
+                new NativeFullTextGlobalIndexWriter(
+                        createFileWriter(indexPath), indexOptions(options))) {
+            writer.write(
+                    BinaryString.fromString(
+                            "Paimon支持中文搜索和Rust开发 hello_world alpha.beta 
getUserName"),
+                    0);
+            writer.write(
+                    BinaryString.fromString("Paimon支持英文搜索和Java开发 hello planet 
alpha gamma"), 1);
+            results = writer.finish();
+        }
+        assertThat(serializedOptions(results.get(0).meta()))
+                .containsEntry("tokenizer", "icu/split");
+
+        try (NativeFullTextGlobalIndexReader reader =
+                createReader(createFileReader(), toIOMetas(results, 
indexPath))) {
+            for (String query : new String[] {"中文", "RUST", "world", "beta", 
"getusername"}) {
+                Optional<ScoredGlobalIndexResult> searchResult =
+                        reader.visitFullTextSearch(
+                                        new FullTextSearch("text", 
matchQuery(query), 10))
+                                .join();
+                assertThat(searchResult).as("query: %s", query).isPresent();
+                assertThat(searchResult.get().results()).as("query: %s", 
query).containsExactly(0L);
+            }
+
+            // Splitting identifiers on punctuation must not split camelCase 
identifiers.
+            Optional<ScoredGlobalIndexResult> searchResult =
+                    reader.visitFullTextSearch(new FullTextSearch("text", 
matchQuery("user"), 10))
+                            .join();
+            assertThat(searchResult).isPresent();
+            assertThat(searchResult.get().results()).isEmpty();
+        }
+    }
+
     @Test
     public void testSearchNoResults() throws IOException {
         GlobalIndexFileWriter fileWriter = createFileWriter(indexPath);
diff --git a/pom.xml b/pom.xml
index 9d585de1b2..ff7bc91b92 100644
--- a/pom.xml
+++ b/pom.xml
@@ -118,7 +118,7 @@ under the License.
         <protobuf-java.version>3.19.6</protobuf-java.version>
         <roaringbitmap.version>1.2.1</roaringbitmap.version>
         <arrow.version>15.0.0</arrow.version>
-        <paimon.full-text-index.version>0.1.0</paimon.full-text-index.version>
+        <paimon.full-text-index.version>0.2.0</paimon.full-text-index.version>
 
         <!-- Can be set to any value to reproduce a specific build. -->
         <test.randomization.seed/>

Reply via email to