-
Notifications
You must be signed in to change notification settings - Fork 10
feat: Add full-text index type support #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive support for full-text index parser types in the OceanBase vector client library. It expands the available full-text search capabilities by introducing new parser options and improves sqlglot compatibility for JSON table operations.
Key changes:
- Extends FtsParser enum to support NGRAM2, BASIC_ENGLISH, and JIEBA parsers alongside the existing IK and NGRAM options
- Updates FtsIndexParam to accept custom parser strings and handle None as default Space parser
- Adds 8 comprehensive test cases covering parser types, multi-field indexes, Chinese search, case-insensitivity, and complex queries
- Fixes JSON table client to manually construct JOIN nodes for sqlglot compatibility
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| pyobvector/client/fts_index_param.py | Adds new parser types (NGRAM2, BASIC_ENGLISH, JIEBA) to FtsParser enum, updates param_str() to handle all parser types including custom strings, and improves documentation |
| tests/test_fts_index.py | Adds comprehensive test suite with 8 new test methods covering different parser types, multi-field indexes, Chinese text search, case-insensitive search, complex queries, and dynamic index creation |
| pyobvector/client/ob_vec_json_table_client.py | Refactors JSON table JOIN construction to manually create JOIN nodes instead of parsing comma-separated tables for better sqlglot version compatibility |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Close #50
Solution Description
Supplements full-text index type support