mirror of
https://github.com/searxng/searxng.git
synced 2026-05-26 21:00:13 +02:00
[unbload] drop meaningless field `number_of_results_xpath` from results (#6130)
In the result-list, the ``number_of_results`` indicate the number of hits in the Index, they do not indicate how many results are in the answer. In the past, search engines such as google or ddg had an indication on the first page of a search term of how many hits there were for this term in total in their index. This info was added up in SearXNG and delivered under ``number_of_results``. Nowadays the search engines no longer indicate how many hits there are in the index and so this field in SearXNG is also superfluous. - https://github.com/searxng/searxng/issues/2457#issuecomment-2566181574 - https://github.com/searxng/searxng/issues/2987 - https://github.com/searxng/searxng/issues/5034 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
@@ -57,7 +57,6 @@ class ViewsTestCase(SearxTestCase): # pylint: disable=too-many-public-methods
|
||||
infoboxes=[],
|
||||
unresponsive_engines=set(),
|
||||
results=test_results,
|
||||
number_of_results=3,
|
||||
results_length=lambda: len(test_results),
|
||||
get_timings=lambda: timings,
|
||||
redirect_url=None,
|
||||
@@ -161,8 +160,6 @@ class ViewsTestCase(SearxTestCase): # pylint: disable=too-many-public-methods
|
||||
|
||||
self.assertIn(b'<description>Search results for "test" - SearXNG</description>', result.data)
|
||||
|
||||
self.assertIn(b'<opensearch:totalResults>3</opensearch:totalResults>', result.data)
|
||||
|
||||
self.assertIn(b'<title>First Test</title>', result.data)
|
||||
|
||||
self.assertIn(b'<link>http://first.test.xyz</link>', result.data)
|
||||
|
||||
Reference in New Issue
Block a user