Skip to content

rollback enhanced hybrid search#151

Merged
hnwyllmm merged 3 commits into
oceanbase:developfrom
hnwyllmm:rollback-hybrid
Jan 28, 2026
Merged

rollback enhanced hybrid search#151
hnwyllmm merged 3 commits into
oceanbase:developfrom
hnwyllmm:rollback-hybrid

Conversation

@hnwyllmm

@hnwyllmm hnwyllmm commented Jan 28, 2026

Copy link
Copy Markdown
Member

Summary

close #150

rollback enhanced hybrid search which committed by #63

Summary by CodeRabbit

  • Refactor

    • Removed the fluent hybrid-search builder; hybrid_search now accepts dictionary-style parameters only.
    • Removed per-route boost parameters and builder precedence from hybrid search inputs.
  • Documentation

    • Examples and docs updated to show direct dict-based hybrid_search usage; builder-specific content removed.
  • Tests

    • Builder-focused integration tests removed; remaining tests updated to use dict-style calls.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 28, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Removed the HybridSearch fluent builder and its module, deleted builder-specific tests and examples, and updated collection.hybrid_search to accept only dict-based parameters; also removed related exported constants and types from package entry points.

Changes

Cohort / File(s) Summary
Documentation Cleanup
README.md
Removed HybridSearch builder usage, builder-precedence notes, and per-route boost examples; simplified hybrid_search examples to dict-style parameters.
Public API Surface Removal
src/pyseekdb/__init__.py, src/pyseekdb/client/__init__.py
Removed imports/exports of DOCUMENT, DOCUMENTS, EMBEDDINGS, EMBEDDINGS_FIELD, IDS, METADATAS, SCORES, TEXT, HybridSearch, and K.
Core Implementation Removal
src/pyseekdb/client/hybrid_search.py
Deleted the entire HybridSearch builder module including its helper types, builders, validation, and conversion utilities.
API Signature & Docstring Changes
src/pyseekdb/client/collection.py, src/pyseekdb/client/client_base.py
Collection.hybrid_search signature now accepts only `query: dict[str, Any]
Examples & Tests
examples/hybrid_search_example.py, tests/integration_tests/test_collection_hybrid_search.py, tests/integration_tests/test_collection_hybrid_search_builder_integration.py
Examples converted from builder pattern to direct dict calls; integration test updated to flattened dicts (removed boost fields); builder integration test module deleted.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I nibbled at code and cleared the track,
The fluent path folded — no more builder stack.
Now dicts hop in, tidy and spry,
Simpler routes beneath the sky,
A carrot-sprung change — a joyful sigh!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'rollback enhanced hybrid search' accurately summarizes the main objective of reverting recent hybrid search enhancements.
Linked Issues check ✅ Passed The PR successfully addresses issue #150 by removing the HybridSearch builder and reverting to dict-based hybrid_search API.
Out of Scope Changes check ✅ Passed All changes are focused on rolling back hybrid search enhancements; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/pyseekdb/client/collection.py (1)

503-520: Docstring example still references removed boost parameter.

The example in the docstring still shows "boost": 0.5 in the query dict (line 510-511), but the boost parameter was part of the enhanced hybrid search that is being rolled back. The README documentation correctly omits boost from examples.

📝 Suggested fix to remove boost from docstring example
        Examples:
            # Hybrid search with both full-text and vector search
            results = collection.hybrid_search(
                query={
                    "where_document": {"$contains": "machine learning"},
                    "where": {"category": {"$eq": "science"}},
-                   "n_results": 10,
-                   "boost": 0.5
+                   "n_results": 10
                },
                knn={
                    "query_texts": ["AI research"],
                    "where": {"year": {"$gte": 2020}},
                    "n_results": 10
                },

@hnwyllmm hnwyllmm merged commit 690f820 into oceanbase:develop Jan 28, 2026
7 checks passed
@hnwyllmm hnwyllmm deleted the rollback-hybrid branch January 28, 2026 08:52
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]: rollback the latest hybrid_search code

1 participant