Skip to content

Extending the tests to validate more supported scorers for hybrid search. Adding experimental_method annotation to hybrid_search commands.#3939

Merged
petyaslavova merged 4 commits intomasterfrom
ps_add_missing_arg_for_hybrid
Feb 6, 2026
Merged

Extending the tests to validate more supported scorers for hybrid search. Adding experimental_method annotation to hybrid_search commands.#3939
petyaslavova merged 4 commits intomasterfrom
ps_add_missing_arg_for_hybrid

Conversation

@petyaslavova
Copy link
Collaborator

Description of change

Please provide a description of the change here.

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

…rch. Adding experimental_method annotation to hybrid_search commands.
Copy link
Contributor

Copilot AI left a 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 extends test coverage for hybrid search scorer support and adds experimental annotations to hybrid_search methods. The changes validate that multiple scoring algorithms (TFIDF, TFIDF.DOCNORM, BM25, BM25STD, BM25STD.TANH, DISMAX, DOCSCORE, HAMMING) work with hybrid search operations.

Changes:

  • Added new test method test_hybrid_search_query_with_supported_scorer to validate multiple scoring algorithms
  • Updated documentation for scorer parameter to include newly tested scoring algorithms
  • Added @experimental_method() decorator to both sync and async hybrid_search methods

Reviewed changes

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

File Description
tests/test_search.py Adds test to validate 8 different scoring algorithms work with hybrid search
redis/commands/search/hybrid_query.py Updates scorer documentation to list additional supported scoring algorithms
redis/commands/search/commands.py Adds experimental_method decorator to hybrid_search methods (sync and async)

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

petyaslavova and others added 2 commits February 5, 2026 21:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@petyaslavova
Copy link
Collaborator Author

augment review

@augmentcode
Copy link

augmentcode bot commented Feb 6, 2026

🤖 Augment PR Summary

Summary: This PR expands hybrid-search scorer coverage and improves experimental/deprecation utilities for async APIs.

Changes:

  • Marks `ft().hybrid_search()` (sync + asyncio) as experimental via `@experimental_method()`.
  • Updates HybridSearchQuery scorer documentation to include additional server-supported algorithms.
  • Refactors `deprecated_function`, `deprecated_args`, `experimental_method`, and `experimental_args` to correctly wrap coroutine functions and avoid mutable default parameters.
  • Adds new sync and asyncio unit tests validating emitted warnings and metadata preservation for the decorators.
  • Adds a Redis-version-gated test that iterates through multiple supported scorers to ensure the server accepts each value.

Technical Notes: Decorators now use inspect.iscoroutinefunction() and an argument-filtering helper to keep behavior consistent across sync/async call sites.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@petyaslavova petyaslavova merged commit 65623b7 into master Feb 6, 2026
107 of 110 checks passed
@petyaslavova petyaslavova deleted the ps_add_missing_arg_for_hybrid branch February 6, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

experimental maintenance Maintenance (CI, Releases, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants