X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/7bdd822d952e629231522af6062e10d7c1f31872..2395dcee4ca15b655b7500d6105176d7635fff1f:/src/search/index.py diff --git a/src/search/index.py b/src/search/index.py index 70214c554..0bd5c0530 100644 --- a/src/search/index.py +++ b/src/search/index.py @@ -670,7 +670,7 @@ class SearchResult(object): m.update(f[self.OTHER]) hits.append(m) - hits.sort(lambda a, b: cmp(a['score'], b['score']), reverse=True) + hits.sort(key=lambda h: h['score'], reverse=True) self._processed_hits = hits