Skip to content

Commit cd36159

Browse files
committed
fix: Remove ef_runtime from AggregateHybridQuery - not supported by FT.AGGREGATE
AggregateHybridQuery uses FT.AGGREGATE commands which do NOT support runtime parameters. Runtime parameters (ef_runtime for HNSW, search_window_size for SVS-VAMANA) only work with FT.SEARCH commands (VectorQuery, VectorRangeQuery). Changes: - Removed ef_runtime parameter from AggregateHybridQuery.__init__() - Removed EF_RUNTIME and EF_RUNTIME_PARAM constants - Removed ef_runtime handling from params property and _build_query_string() - Removed test_aggregate_hybrid_query_ef_runtime() test - Updated docs/api/query.rst to clarify no runtime parameters are supported - Removed ef_runtime example from docs/user_guide/11_advanced_queries.ipynb - Updated notebook to explain runtime parameters only work with VectorQuery This fixes CI failures where ef_runtime was causing 'Invalid option' errors when used with FT.AGGREGATE commands.
1 parent 2cfd386 commit cd36159

File tree

4 files changed

+33
-127
lines changed

4 files changed

+33
-127
lines changed

docs/api/query.rst

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,27 +126,24 @@ HybridQuery
126126
.. note::
127127
**Runtime Parameters for Hybrid Queries**
128128

129-
AggregateHybridQuery (and the deprecated HybridQuery) support runtime parameters for the vector search component.
129+
**Important:** AggregateHybridQuery uses FT.AGGREGATE commands which do NOT support runtime parameters.
130+
Runtime parameters (``ef_runtime``, ``search_window_size``, ``use_search_history``, ``search_buffer_capacity``)
131+
are only supported with FT.SEARCH commands.
130132

131-
**Note:** AggregateHybridQuery uses FT.AGGREGATE commands which only support the ``ef_runtime`` parameter for HNSW indexes. SVS-VAMANA runtime parameters (``search_window_size``, ``use_search_history``, ``search_buffer_capacity``) are NOT supported in FT.AGGREGATE commands. For full runtime parameter support including SVS-VAMANA, use VectorQuery or VectorRangeQuery which use FT.SEARCH commands.
133+
For runtime parameter support, use :class:`VectorQuery` or :class:`VectorRangeQuery` instead of AggregateHybridQuery.
132134

133-
**Supported Runtime Parameter:**
134-
135-
- ``ef_runtime``: Controls search accuracy for HNSW indexes (higher = better recall, slower search)
136-
137-
Example:
135+
Example with VectorQuery (supports runtime parameters):
138136

139137
.. code-block:: python
140138
141-
from redisvl.query import AggregateHybridQuery
139+
from redisvl.query import VectorQuery
142140
143-
query = AggregateHybridQuery(
144-
text="search query",
145-
text_field_name="description",
141+
query = VectorQuery(
146142
vector=[0.1, 0.2, 0.3],
147143
vector_field_name="embedding",
148-
alpha=0.7,
149-
ef_runtime=150 # Only HNSW ef_runtime is supported
144+
return_fields=["description"],
145+
num_results=10,
146+
ef_runtime=150 # Runtime parameters work with VectorQuery
150147
)
151148
152149

0 commit comments

Comments
 (0)