JingsongLi opened a new pull request, #8308:
URL: https://github.com/apache/paimon/pull/8308

   ## Summary
   
   Add a single-column structured full-text query DSL for Paimon full-text 
search. The DSL supports match, phrase, fuzzy, boost, and boolean queries while 
preserving the existing query text/operator APIs and Spark SQL function shape.
   
   ## Changes
   
   - Add `FullTextQuery` as a canonical Java representation for structured 
full-text queries, including JSON parsing/serialization and validation.
   - Teach `FullTextSearch`, Java builders, Spark scan pushdown, and the test 
full-text reader to preserve structured query semantics end to end.
   - Add Tantivy JNI JSON search entry points and build Tantivy query objects 
for match, phrase, fuzzy, boost, and boolean query forms.
   - Reject `multi_match` explicitly for now because the current full-text 
index is single-column.
   - Document structured DSL usage for Spark SQL and Java API.
   
   ## Testing
   
   - `mvn -pl paimon-common,paimon-core -am -Pfast-build -DfailIfNoTests=false 
-Dtest=FullTextQueryTest,FullTextSearchBuilderTest test`
   - `cargo check` in `paimon-tantivy/paimon-tantivy-jni/rust`
   - `mvn -pl paimon-tantivy/paimon-tantivy-index -am -Pfast-build 
-DfailIfNoTests=false -Dtest=TantivyFullTextGlobalIndexTest test`
   - `mvn -pl 
paimon-spark/paimon-spark-common,paimon-spark/paimon-spark3-common,paimon-spark/paimon-spark-ut
 -am -Pspark3,fast-build -DfailIfNoTests=false 
-DwildcardSuites=org.apache.paimon.spark.sql.FullTextSearchTest -Dtest=none 
test`
   - `mvn -pl 
paimon-common,paimon-core,paimon-tantivy/paimon-tantivy-index,paimon-spark/paimon-spark-common,paimon-spark/paimon-spark3-common,paimon-spark/paimon-spark-ut
 -am -Pspark3 -DskipTests -DfailIfNoTests=false compile`
   - `git diff --check`
   
   ## Notes
   
   `multi_match` is reserved for future multi-column full-text indexes. Tantivy 
fuzzy search currently supports fuzziness up to 2; `max_expansions` and 
`prefix_length` are rejected unless they keep the default values because 
Tantivy 0.22 does not expose those controls through the public API used here.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to