Skip to content

tipb: add scalar protocol for Local MATCH AGAINST in Boolean mode - #432

Merged
solotzg merged 12 commits into
pingcap:feature/release-8.5-ftsfrom
solotzg:release-8.5-match-against
Oct 14, 2026
Merged

solotzg merged 12 commits into
pingcap:feature/release-8.5-ftsfrom
solotzg:release-8.5-match-against

Conversation

@solotzg

@solotzg solotzg commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add the LocalMatchAgainstBoolean scalar signature with ID 5250.
  • Add the Boolean query payload and analyzer settings used by the release-8.5 TiDB/TiFlash row-wise Local MATCH path.
  • Keep this release-specific protocol aligned with TiDB and TiFlash feature/release-8.5-fts; master PR tipb: reserve Local MATCH scalar signature #431 separately reserves the scalar signature ID.

Validation

  • GOWORK=off GOCACHE=/private/tmp/tipb-go-cache go test ./go-tipb — passed (package compiles; no test files).
  • Tipb PR CI — Go, C++, and Rust generation checks passed; CLA passed.
  • In TiFlash, regenerated Tipb C++ protocol sources and compiled the Local MATCH implementation and gtest source objects. The full gtest executable was not linked/run.

Summary by CodeRabbit

  • New Features
    • Added a query format for Boolean full-text search, supporting required, optional, and excluded terms, plus phrase and prefix terms.
    • Query metadata now includes parser, tokenization, stopword, and collation settings.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 483eb13b-d3ac-49a6-8ad4-185bb5722e9a
📥 Commits

Reviewing files that changed from the base of the PR and between abb1604 and 288bce9.

⛔ Files ignored due to path filters: 1
  • go-tipb/expression.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing: 1
  • proto/expression.proto
🚧 Files skipped from review as they are similar to previous changes: 1
  • proto/expression.proto

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The protobuf schema adds the LocalMatchAgainstBoolean scalar function signature and defines query nodes, clause metadata, parser options, stopword settings, and versioned wire semantics.

Changes: Local MATCH Boolean schema

Layer / File(s) Summary
Define the query contract
proto/expression.proto
Adds scalar function ID 5250 and enums and messages for Boolean clauses, parser settings, token limits, stopword handling, collation, and wire version.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: ailinkid

Merge Risk: ⚪ Minimal · up to 288bc

This PR adds a new scalar function signature and the Local MATCH Boolean query schema. It is additive and no concrete merge-blocking risk was found.

### Architecture Summary

Architecture risk: 🔵 Low · up to abb16

The change affects 1 system.

Changed systems: proto

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — proto (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in proto/expression.proto: ScalarFuncSig adds the LocalMatchAgainstBoolean value with numeric ID 5250.
  • observed — Modified behavior in proto/expression.proto: Adds the Local MATCH Boolean query wire schema: enums define occurrence, term, parser, and stopword modes; the query message carries nodes and analyzer, stopword, collation, and version settings; each node carries occurrence, term type, and text. The versioning comments specify rejection of unknown versions and identify the built-in stopword set as part of the versioned semantics.
Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title is concise, uses the repository module prefix, and clearly identifies the new scalar protocol for Local MATCH AGAINST Boolean mode.
Description check Passed The description clearly explains the protocol additions, release-specific alignment, and validation results. It does not use the repository template headings and omits explicit problem, related-change…
✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit reads the query nodes,
And hops through clauses, words, and codes.
A parser sorts each token right,
While stopwords rest outside the light.
The schema keeps its version clear,
Then bounds away with carrots near.

Comment @coderabbitai help to get the list of available commands.

Comment thread proto/executor.proto

@AilinKid AilinKid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest LGTM

Comment thread proto/expression.proto
@solotzg solotzg changed the title tipb: add Local MATCH Boolean protocol for release-8.5 tipb: add scalar protocol for Local MATCH AGAINST in Boolean mode Oct 14, 2026
@solotzg
solotzg merged commit 4044aac into pingcap:feature/release-8.5-fts Oct 14, 2026
7 of 8 checks passed
@solotzg
solotzg deleted the release-8.5-match-against branch October 14, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants