Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
51ce1e0
Abstract full-text query construction into helper class
vishal-bala Dec 4, 2025
9b7283b
Remove unused imports
vishal-bala Dec 4, 2025
99f9d99
Formatting
vishal-bala Dec 4, 2025
527b024
Implement `HybridQuery` with tests
vishal-bala Dec 4, 2025
6c0edd7
Implement vsim search method params and vsim filtering in `HybridQuery`
vishal-bala Dec 4, 2025
da2283e
Update `redisvl.query.aggregate.HybridQuery` deprecation message
vishal-bala Dec 4, 2025
80f1927
Add support for combination methods and postprocessing
vishal-bala Dec 5, 2025
9832369
Update hybrid search usage based on in-practice constraints
vishal-bala Dec 5, 2025
b691255
Update/fix existing tests
vishal-bala Dec 5, 2025
4b3a1fe
Implement async hybrid search
vishal-bala Dec 5, 2025
4d3ba70
Update docstrings
vishal-bala Dec 5, 2025
093fbde
Update GH Actions test configuration to include Redis 8.4.0 and redis…
vishal-bala Dec 5, 2025
1c0e77f
Update uv.lock
vishal-bala Dec 5, 2025
6fdf59a
Python 3.9 compatibility fixes
vishal-bala Dec 5, 2025
900073a
Fix method reference
vishal-bala Dec 5, 2025
e1e261d
Catch `ModuleNotFoundError` as well
vishal-bala Dec 8, 2025
cee1fba
Standardize test skip reason
vishal-bala Dec 8, 2025
cdba22f
Update expected number of results to hybrid search default
vishal-bala Dec 8, 2025
3173502
Remove ambiguous `redisvl.query` import for `HybridQuery`
vishal-bala Dec 8, 2025
ecd5c1b
Update docs
vishal-bala Dec 8, 2025
bf87c6a
Update imports
vishal-bala Dec 8, 2025
e44c439
Fix test skipping logic (for Python 3.9 issues)
vishal-bala Dec 8, 2025
7210aae
Re-add additional test skipping logic
vishal-bala Dec 8, 2025
3b6ef3a
Oops missed one
vishal-bala Dec 8, 2025
9c5fb4b
Remove deprecated `HybridQuery` class
vishal-bala Dec 8, 2025
8d4e91d
Manage dependency logic for user guide notebook
vishal-bala Dec 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ jobs:
matrix:
# 3.11 tests are run in the service-tests job
python-version: ["3.9", "3.10", "3.12", "3.13"]
redis-py-version: ["5.x", "6.x"]
redis-version: ["6.2.6-v9", "latest", "8.0.2"]
redis-py-version: ["5.x", "6.x", "7.x"]
redis-version: ["6.2.6-v9", "latest", "8.0.2", "8.4.0"]
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -130,13 +130,15 @@ jobs:
# Install right redis version based on redis py
if [[ "${{ matrix.redis-py-version }}" == "5.x" ]]; then
uv pip install "redis>=5,<6"
else
elif [[ "${{ matrix.redis-py-version }}" == "6.x" ]]; then
uv pip install "redis>=6,<7"
else
uv pip install "redis>=7,<8"
fi

- name: Set Redis image name
run: |
if [[ "${{ matrix.redis-version }}" == "8.0.2" ]]; then
if [[ "${{ matrix.redis-version }}" == "8.0.2" || "${{ matrix.redis-version }}" == "8.4.0" ]]; then
echo "REDIS_IMAGE=redis:${{ matrix.redis-version }}" >> $GITHUB_ENV
else
echo "REDIS_IMAGE=redis/redis-stack-server:${{ matrix.redis-version }}" >> $GITHUB_ENV
Expand Down
36 changes: 28 additions & 8 deletions docs/api/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,21 @@ VectorRangeQuery
use_search_history='AUTO' # SVS-VAMANA only
)

HybridQuery
AggregateHybridQuery
================


.. currentmodule:: redisvl.query


.. autoclass:: HybridQuery
.. autoclass:: AggregateHybridQuery
:members:
:inherited-members:
:show-inheritance:
:exclude-members: add_filter,get_args,highlight,return_field,summarize

.. note::
The ``stopwords`` parameter in :class:`HybridQuery` (and :class:`AggregateHybridQuery`) controls query-time stopword filtering (client-side).
The ``stopwords`` parameter in :class:`AggregateHybridQuery` (and :class:`HybridQuery`) controls query-time stopword filtering (client-side).
For index-level stopwords configuration (server-side), see :class:`redisvl.schema.IndexInfo.stopwords`.
Using query-time stopwords with index-level ``STOPWORDS 0`` is counterproductive.

Expand All @@ -130,22 +130,42 @@ HybridQuery
Runtime parameters (``ef_runtime``, ``search_window_size``, ``use_search_history``, ``search_buffer_capacity``)
are only supported with FT.SEARCH commands.

For runtime parameter support, use :class:`VectorQuery` or :class:`VectorRangeQuery` instead of AggregateHybridQuery.
For runtime parameter support, use :class:`HybridQuery`, :class:`VectorQuery`, or :class:`VectorRangeQuery` instead of AggregateHybridQuery.

Example with VectorQuery (supports runtime parameters):
Example with HybridQuery (supports runtime parameters):

.. code-block:: python

from redisvl.query import VectorQuery
from redisvl.query.hybrid import HybridQuery

query = VectorQuery(
query = HybridQuery(
text="query string",
text_field_name="description",
vector=[0.1, 0.2, 0.3],
vector_field_name="embedding",
vector_search_method="KNN",
knn_k=10,
knn_ef_runtime=150, # Runtime parameters work with HybridQuery
return_fields=["description"],
num_results=10,
ef_runtime=150 # Runtime parameters work with VectorQuery
)

HybridQuery
================


.. currentmodule:: redisvl.query.hybrid


.. autoclass:: HybridQuery
:members:
:inherited-members:
:show-inheritance:

.. note::
The ``stopwords`` parameter in :class:`HybridQuery` (and :class:`AggregateHybridQuery`) controls query-time stopword filtering (client-side).
For index-level stopwords configuration (server-side), see :class:`redisvl.schema.IndexInfo.stopwords`.
Using query-time stopwords with index-level ``STOPWORDS 0`` is counterproductive.

TextQuery
================
Expand Down
Loading