summaryrefslogtreecommitdiff
path: root/searx/results.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/results.py')
-rw-r--r--searx/results.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/results.py b/searx/results.py
index c3040b305..dcd966ef7 100644
--- a/searx/results.py
+++ b/searx/results.py
@@ -99,6 +99,7 @@ class ResultContainer(object):
self._infobox_ids = {}
self.suggestions = set()
self.answers = set()
+ self.number_of_results = 0
def extend(self, engine_name, results):
for result in list(results):
@@ -111,6 +112,9 @@ class ResultContainer(object):
elif 'infobox' in result:
self._merge_infobox(result)
results.remove(result)
+ elif 'number_of_results' in result:
+ self.number_of_results = max(self.number_of_results, result['number_of_results'])
+ results.remove(result)
with RLock():
engines[engine_name].stats['search_count'] += 1