Skip to content

Typos in query.py #3718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions redis/commands/search/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Query:
the query string. The query string is set in the constructor, and other
options have setter functions.

The setter functions return the query object, so they can be chained,
The setter functions return the query object so they can be chained.
i.e. `Query("foo").verbatim().filter(...)` etc.
"""

Expand Down Expand Up @@ -95,12 +95,12 @@ def summarize(
) -> "Query":
"""
Return an abridged format of the field, containing only the segments of
the field which contain the matching term(s).
the field that contain the matching term(s).

If `fields` is specified, then only the mentioned fields are
summarized; otherwise all results are summarized.
summarized; otherwise, all results are summarized.

Server side defaults are used for each option (except `fields`)
Server-side defaults are used for each option (except `fields`)
if not specified

- **fields** List of fields to summarize. All fields are summarized
Expand Down Expand Up @@ -130,7 +130,7 @@ def highlight(
"""
Apply specified markup to matched term(s) within the returned field(s).

- **fields** If specified then only those mentioned fields are
- **fields** If specified, then only those mentioned fields are
highlighted, otherwise all fields are highlighted
- **tags** A list of two strings to surround the match.
"""
Expand All @@ -154,7 +154,7 @@ def language(self, language: str) -> "Query":
return self

def slop(self, slop: int) -> "Query":
"""Allow a maximum of N intervening non matched terms between
"""Allow a maximum of N intervening non-matched terms between
phrase terms (0 means exact phrase).
"""
self._slop = slop
Expand All @@ -169,7 +169,7 @@ def in_order(self) -> "Query":
"""
Match only documents where the query terms appear in
the same order in the document.
i.e. for the query "hello world", we do not match "world hello"
i.e., for the query "hello world", we do not match "world hello"
"""
self._in_order = True
return self
Expand Down Expand Up @@ -258,7 +258,7 @@ def paging(self, offset: int, num: int) -> "Query":
return self

def verbatim(self) -> "Query":
"""Set the query to be verbatim, i.e. use no query expansion
"""Set the query to be verbatim, i.e., use no query expansion
or stemming.
"""
self._verbatim = True
Expand Down Expand Up @@ -292,7 +292,7 @@ def limit_fields(self, *fields: List[str]) -> "Query":
"""
Limit the search to specific TEXT fields only.

- **fields**: A list of strings, case sensitive field names
- **fields**: A list of strings; case-sensitive field names
from the defined schema.
"""
self._fields = fields
Expand All @@ -301,7 +301,7 @@ def limit_fields(self, *fields: List[str]) -> "Query":
def add_filter(self, flt: "Filter") -> "Query":
"""
Add a numeric or geo filter to the query.
**Currently only one of each filter is supported by the engine**
**Currently, only one of each filter is supported by the engine**

- **flt**: A NumericFilter or GeoFilter object, used on a
corresponding field
Expand All @@ -315,14 +315,14 @@ def sort_by(self, field: str, asc: bool = True) -> "Query":
Add a sortby field to the query.

- **field** - the name of the field to sort by
- **asc** - when `True`, sorting will be done in asceding order
- **asc** - when `True`, sorting will be done in ascending order
"""
self._sortby = SortbyField(field, asc)
return self

def expander(self, expander: str) -> "Query":
"""
Add a expander field to the query.
Add an expander field to the query.

- **expander** - the name of the expander
"""
Expand Down