Skip to content

feat(hybrid-search): support HYBRID_SEARCH SQL syntax for OceanBase 4… - #71

Merged
xxsc0529 merged 2 commits into
oceanbase:mainfrom
xxsc0529:main
Jul 28, 2026
Merged

feat(hybrid-search): support HYBRID_SEARCH SQL syntax for OceanBase 4…#71
xxsc0529 merged 2 commits into
oceanbase:mainfrom
xxsc0529:main

Conversation

@xxsc0529

Copy link
Copy Markdown
Contributor

….6.0

  • add HybridSearch.sql_search() based on the HYBRID_SEARCH table function
  • add version-gated tests for the SQL-level hybrid search syntax
  • document the SQL-level DSL in README and add module to Sphinx index
  • replace Chinese literals in tests and docs with English

Summary

close #70

Solution Description

….6.0

- add HybridSearch.sql_search() based on the HYBRID_SEARCH table function
- add version-gated tests for the SQL-level hybrid search syntax
- document the SQL-level DSL in README and add module to Sphinx index
- replace Chinese literals in tests and docs with English

Copilot AI 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.

Pull request overview

Adds support for OceanBase 4.6.0’s SQL-level HYBRID_SEARCH table function to the pyobvector hybrid search client, with version-gated tests and updated documentation/examples (including English-only test/doc literals).

Changes:

  • Add HybridSearch.sql_search() that executes SELECT ... FROM HYBRID_SEARCH(TABLE ..., DSL_STRING) with version gating.
  • Add/extend tests for SQL-level hybrid search (KNN/match/hybrid/multi-knn/outer where+order) and update test literals to English.
  • Document the SQL-level DSL in README.md and include pyobvector.client.hybrid_search in Sphinx docs.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_ob_vec_client.py Updates test collection name literal to English.
tests/test_json_table.py Replaces Chinese SQL literals/aliases and expected rows with English equivalents.
tests/test_hybrid_search.py Adds version-gated tests for sql_search and updates seed data/query strings to English.
tests/test_fts_index.py Updates test literals to English; renames/adjusts IK parser test naming and assertions.
source/pyobvector.client.rst Adds Sphinx automodule entry for pyobvector.client.hybrid_search.
README.md Documents SQL-level HYBRID_SEARCH usage and provides DSL reference/restrictions.
pyobvector/json_table/virtual_data_type.py Translates an inline comment to English (no logic change).
pyobvector/client/hybrid_search.py Implements sql_search() and version check, plus identifier quoting helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyobvector/client/hybrid_search.py Outdated
Comment thread pyobvector/client/hybrid_search.py Outdated
- always include the __score column in sql_search projection, even
  when a subset of columns is requested
- document that where/order_by are interpolated verbatim and must be
  trusted SQL fragments (SQL injection risk), prefer DSL filters for
  user-provided values
@xxsc0529
xxsc0529 merged commit e322d84 into oceanbase:main Jul 28, 2026
8 checks passed
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.

[Enhancement]: support HYBRID_SEARCH SQL syntax for OceanBase 4.6.0

2 participants