redis 5.1.1__py3-none-any.whl → 5.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- redis/commands/search/aggregation.py +16 -0
- {redis-5.1.1.dist-info → redis-5.2.0.dist-info}/METADATA +1 -1
- {redis-5.1.1.dist-info → redis-5.2.0.dist-info}/RECORD +6 -6
- {redis-5.1.1.dist-info → redis-5.2.0.dist-info}/LICENSE +0 -0
- {redis-5.1.1.dist-info → redis-5.2.0.dist-info}/WHEEL +0 -0
- {redis-5.1.1.dist-info → redis-5.2.0.dist-info}/top_level.txt +0 -0
|
@@ -112,6 +112,7 @@ class AggregateRequest:
|
|
|
112
112
|
self._cursor = []
|
|
113
113
|
self._dialect = None
|
|
114
114
|
self._add_scores = False
|
|
115
|
+
self._scorer = "TFIDF"
|
|
115
116
|
|
|
116
117
|
def load(self, *fields: List[str]) -> "AggregateRequest":
|
|
117
118
|
"""
|
|
@@ -300,6 +301,17 @@ class AggregateRequest:
|
|
|
300
301
|
self._add_scores = True
|
|
301
302
|
return self
|
|
302
303
|
|
|
304
|
+
def scorer(self, scorer: str) -> "AggregateRequest":
|
|
305
|
+
"""
|
|
306
|
+
Use a different scoring function to evaluate document relevance.
|
|
307
|
+
Default is `TFIDF`.
|
|
308
|
+
|
|
309
|
+
:param scorer: The scoring function to use
|
|
310
|
+
(e.g. `TFIDF.DOCNORM` or `BM25`)
|
|
311
|
+
"""
|
|
312
|
+
self._scorer = scorer
|
|
313
|
+
return self
|
|
314
|
+
|
|
303
315
|
def verbatim(self) -> "AggregateRequest":
|
|
304
316
|
self._verbatim = True
|
|
305
317
|
return self
|
|
@@ -323,6 +335,9 @@ class AggregateRequest:
|
|
|
323
335
|
if self._verbatim:
|
|
324
336
|
ret.append("VERBATIM")
|
|
325
337
|
|
|
338
|
+
if self._scorer:
|
|
339
|
+
ret.extend(["SCORER", self._scorer])
|
|
340
|
+
|
|
326
341
|
if self._add_scores:
|
|
327
342
|
ret.append("ADDSCORES")
|
|
328
343
|
|
|
@@ -332,6 +347,7 @@ class AggregateRequest:
|
|
|
332
347
|
if self._loadall:
|
|
333
348
|
ret.append("LOAD")
|
|
334
349
|
ret.append("*")
|
|
350
|
+
|
|
335
351
|
elif self._loadfields:
|
|
336
352
|
ret.append("LOAD")
|
|
337
353
|
ret.append(str(len(self._loadfields)))
|
|
@@ -55,7 +55,7 @@ redis/commands/json/decoders.py,sha256=a_IoMV_wgeJyUifD4P6HTcM9s6FhricwmzQcZRmc-
|
|
|
55
55
|
redis/commands/json/path.py,sha256=0zaO6_q_FVMk1Bkhkb7Wcr8AF2Tfr69VhkKy1IBVhpA,393
|
|
56
56
|
redis/commands/search/__init__.py,sha256=happQFVF0j7P87p7LQsUK5AK0kuem9cA-xvVRdQWpos,5744
|
|
57
57
|
redis/commands/search/_util.py,sha256=9Mp72OO5Ib5UbfN7uXb-iB7hQCm1jQLV90ms2P9XSGU,219
|
|
58
|
-
redis/commands/search/aggregation.py,sha256=
|
|
58
|
+
redis/commands/search/aggregation.py,sha256=Ed9iezAj504gGQnqcmKrG0X_9Y9Jd1ddg2CRvDWcJ4s,11512
|
|
59
59
|
redis/commands/search/commands.py,sha256=3zrkg9FXuscD6IuBdd7zu6B1Q-qED2s6pmbYBep0pyA,37429
|
|
60
60
|
redis/commands/search/document.py,sha256=g2R-PRgq-jN33_GLXzavvse4cpIHBMfjPfPK7tnE9Gc,413
|
|
61
61
|
redis/commands/search/field.py,sha256=ZWHYTtrLi-zZojohqXoidfllxP0SiadBW6hnGkBw7mM,5891
|
|
@@ -69,8 +69,8 @@ redis/commands/timeseries/__init__.py,sha256=gkz6wshEzzQQryBOnrAqqQzttS-AHfXmuN_
|
|
|
69
69
|
redis/commands/timeseries/commands.py,sha256=8Z2BEyP23qTYCJR_e9zdG11yWmIDwGBMO2PJNLtK2BA,47147
|
|
70
70
|
redis/commands/timeseries/info.py,sha256=meZYdu7IV9KaUWMKZs9qW4vo3Q9MwhdY-EBtKQzls5o,3223
|
|
71
71
|
redis/commands/timeseries/utils.py,sha256=NLwSOS5Dz9N8dYQSzEyBIvrItOWwfQ0xgDj8un6x3dU,1319
|
|
72
|
-
redis-5.
|
|
73
|
-
redis-5.
|
|
74
|
-
redis-5.
|
|
75
|
-
redis-5.
|
|
76
|
-
redis-5.
|
|
72
|
+
redis-5.2.0.dist-info/LICENSE,sha256=pXslClvwPXr-VbdAYzE_Ktt7ANVGwKsUmok5gzP-PMg,1074
|
|
73
|
+
redis-5.2.0.dist-info/METADATA,sha256=qwgjp9OwwLNWqXHlpONSrTGFiFX1E43jET9K0UNihXU,9138
|
|
74
|
+
redis-5.2.0.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
|
75
|
+
redis-5.2.0.dist-info/top_level.txt,sha256=OMAefszlde6ZoOtlM35AWzpRIrwtcqAMHGlRit-w2-4,6
|
|
76
|
+
redis-5.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|