[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:
Markus Heiser
2026-05-25 12:43:02 +02:00
committed by GitHub
parent efc305b7f9
commit dd27fce3b7
15 changed files with 1 additions and 74 deletions
-4
View File
@@ -43,7 +43,6 @@ from flask.json import jsonify
from flask_babel import (
Babel,
gettext,
format_decimal,
)
import searx
@@ -564,7 +563,6 @@ def index_error(output_format: str, error_message: str):
'opensearch_response_rss.xml',
results=[],
q=sxng_request.form['q'] if 'q' in sxng_request.form else '',
number_of_results=0,
error_message=error_message,
)
return Response(response_rss, mimetype='text/xml')
@@ -724,7 +722,6 @@ def search():
'opensearch_response_rss.xml',
results=results,
q=sxng_request.form['q'],
number_of_results=result_container.number_of_results,
)
return Response(response_rss, mimetype='text/xml')
@@ -761,7 +758,6 @@ def search():
selected_categories = search_query.categories,
pageno = search_query.pageno,
time_range = search_query.time_range or '',
number_of_results = format_decimal(result_container.number_of_results),
suggestions = suggestion_urls,
answers = result_container.answers,
corrections = correction_urls,