Skip to content

Commit e07376d

Browse files
committed
docs: Add stopwords documentation for AggregateHybridQuery
Add documentation about index-level vs query-time stopwords interaction for AggregateHybridQuery: 1. Updated AggregateHybridQuery.__init__() docstring - Added note about query-time vs index-level stopwords - References stopwords_interaction_guide.md for details 2. Updated docs/api/query.rst - Added note for HybridQuery/AggregateHybridQuery section - Matches the note already present for TextQuery - Links to Stopwords Interaction Guide This completes the documentation updates for stopwords support across all query types that use stopwords (TextQuery, AggregateHybridQuery).
1 parent 2bd23c7 commit e07376d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/api/query.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ HybridQuery
4747
:show-inheritance:
4848
:exclude-members: add_filter,get_args,highlight,return_field,summarize
4949

50+
.. note::
51+
The ``stopwords`` parameter in :class:`HybridQuery` (and :class:`AggregateHybridQuery`) controls query-time stopword filtering (client-side).
52+
For index-level stopwords configuration (server-side), see :class:`redisvl.schema.IndexInfo.stopwords`.
53+
Using query-time stopwords with index-level ``STOPWORDS 0`` is counterproductive.
54+
See the `Stopwords Interaction Guide <../stopwords_interaction_guide.html>`_ for details.
55+
5056

5157
TextQuery
5258
================

redisvl/query/aggregate.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ def __init__(
128128
provided then a default set of stopwords for that language will be used. if a list,
129129
set, or tuple of strings is provided then those will be used as stopwords.
130130
Defaults to "english". if set to "None" then no stopwords will be removed.
131+
132+
Note: This parameter controls query-time stopword filtering (client-side).
133+
For index-level stopwords configuration (server-side), see IndexInfo.stopwords.
134+
Using query-time stopwords with index-level STOPWORDS 0 is counterproductive.
135+
See docs/stopwords_interaction_guide.md for details.
131136
dialect (int, optional): The Redis dialect version. Defaults to 2.
132137
text_weights (Optional[Dict[str, float]]): The importance weighting of individual words
133138
within the query text. Defaults to None, as no modifications will be made to the

0 commit comments

Comments
 (0)