Skip to content

Commit c0be24f

Browse files
updates docstrings
1 parent ff44041 commit c0be24f

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

redisvl/index/index.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -822,11 +822,11 @@ def _query(self, query: BaseQuery) -> List[Dict[str, Any]]:
822822
def query(self, query: Union[BaseQuery, AggregationQuery]) -> List[Dict[str, Any]]:
823823
"""Execute a query on the index.
824824
825-
This method takes a BaseQuery object directly, runs the search, and
825+
This method takes a BaseQuery or AggregationQuery object directly, and
826826
handles post-processing of the search.
827827
828828
Args:
829-
query (BaseQuery): The query to run.
829+
query (Union[BaseQuery, AggregateQuery]): The query to run.
830830
831831
Returns:
832832
List[Result]: A list of search results.
@@ -1498,7 +1498,7 @@ async def query(
14981498
the search, and handles post-processing of the search.
14991499
15001500
Args:
1501-
query Union(BaseQuery, AggregationQuery): The query to run.
1501+
query (Union[BaseQuery, AggregateQuery]): The query to run.
15021502
15031503
Returns:
15041504
List[Result]: A list of search results.

redisvl/query/aggregate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545
dialect: int = 2,
4646
):
4747
"""
48-
Instantiages a HybridQuery object.
48+
Instantiates a HybridQuery object.
4949
5050
Args:
5151
text (str): The text to search for.

redisvl/query/query.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,16 @@ def stopwords(self):
795795
return self._stopwords
796796

797797
def _set_stopwords(self, stopwords: Optional[Union[str, Set[str]]] = "english"):
798+
"""Set the stopwords to use in the query.
799+
Args:
800+
stopwords (Optional[Union[str, Set[str]]]): The stopwords to use. If a string
801+
such as "english" "german" is provided then a default set of stopwords for that
802+
language will be used. if a list, set, or tuple of strings is provided then those
803+
will be used as stopwords. Defaults to "english". if set to "None" then no stopwords
804+
will be removed.
805+
Raises:
806+
TypeError: If the stopwords are not a set, list, or tuple of strings.
807+
"""
798808
if not stopwords:
799809
self._stopwords = set()
800810
elif isinstance(stopwords, str):

0 commit comments

Comments
 (0)