Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8083505

Browse files
Fixing typos in query.py (#3718)
1 parent 78c354a commit 8083505

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

‎redis/commands/search/query.py‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Query:
99
the query string. The query string is set in the constructor, and other
1010
options have setter functions.
1111
12-
The setter functions return the query object, so they can be chained,
12+
The setter functions return the query object so they can be chained.
1313
i.e. `Query("foo").verbatim().filter(...)` etc.
1414
"""
1515

@@ -95,12 +95,12 @@ def summarize(
9595
) -> "Query":
9696
"""
9797
Return an abridged format of the field, containing only the segments of
98-
the field which contain the matching term(s).
98+
the field that contain the matching term(s).
9999
100100
If `fields` is specified, then only the mentioned fields are
101-
summarized; otherwise all results are summarized.
101+
summarized; otherwise, all results are summarized.
102102
103-
Serverside defaults are used for each option (except `fields`)
103+
Server-side defaults are used for each option (except `fields`)
104104
if not specified
105105
106106
- **fields** List of fields to summarize. All fields are summarized
@@ -130,7 +130,7 @@ def highlight(
130130
"""
131131
Apply specified markup to matched term(s) within the returned field(s).
132132
133-
- **fields** If specified then only those mentioned fields are
133+
- **fields** If specified, then only those mentioned fields are
134134
highlighted, otherwise all fields are highlighted
135135
- **tags** A list of two strings to surround the match.
136136
"""
@@ -154,7 +154,7 @@ def language(self, language: str) -> "Query":
154154
return self
155155

156156
def slop(self, slop: int) -> "Query":
157-
"""Allow a maximum of N intervening nonmatched terms between
157+
"""Allow a maximum of N intervening non-matched terms between
158158
phrase terms (0 means exact phrase).
159159
"""
160160
self._slop = slop
@@ -169,7 +169,7 @@ def in_order(self) -> "Query":
169169
"""
170170
Match only documents where the query terms appear in
171171
the same order in the document.
172-
i.e. for the query "hello world", we do not match "world hello"
172+
i.e., for the query "hello world", we do not match "world hello"
173173
"""
174174
self._in_order = True
175175
return self
@@ -258,7 +258,7 @@ def paging(self, offset: int, num: int) -> "Query":
258258
return self
259259

260260
def verbatim(self) -> "Query":
261-
"""Set the query to be verbatim, i.e. use no query expansion
261+
"""Set the query to be verbatim, i.e., use no query expansion
262262
or stemming.
263263
"""
264264
self._verbatim = True
@@ -292,7 +292,7 @@ def limit_fields(self, *fields: List[str]) -> "Query":
292292
"""
293293
Limit the search to specific TEXT fields only.
294294
295-
- **fields**: A list of strings, casesensitive field names
295+
- **fields**: A list of strings; case-sensitive field names
296296
from the defined schema.
297297
"""
298298
self._fields = fields
@@ -301,7 +301,7 @@ def limit_fields(self, *fields: List[str]) -> "Query":
301301
def add_filter(self, flt: "Filter") -> "Query":
302302
"""
303303
Add a numeric or geo filter to the query.
304-
**Currently only one of each filter is supported by the engine**
304+
**Currently, only one of each filter is supported by the engine**
305305
306306
- **flt**: A NumericFilter or GeoFilter object, used on a
307307
corresponding field
@@ -315,14 +315,14 @@ def sort_by(self, field: str, asc: bool = True) -> "Query":
315315
Add a sortby field to the query.
316316
317317
- **field** - the name of the field to sort by
318-
- **asc** - when `True`, sorting will be done in asceding order
318+
- **asc** - when `True`, sorting will be done in ascending order
319319
"""
320320
self._sortby = SortbyField(field, asc)
321321
return self
322322

323323
def expander(self, expander: str) -> "Query":
324324
"""
325-
Add a expander field to the query.
325+
Add an expander field to the query.
326326
327327
- **expander** - the name of the expander
328328
"""

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /