Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error checking #160

Merged
merged 1 commit into from
Sep 23, 2023
Merged

Update error checking #160

merged 1 commit into from
Sep 23, 2023

Conversation

dalf
Copy link
Member

@dalf dalf commented Sep 23, 2023

In the master branch, instances which return an error message and nothing are erroneously seen as a valid. This is fixed.

For the "Search response time" column:

  • Some instances return results only from the wiki* engines: this commit expect at least one result of a generic engine (not a wiki* engine).
  • 5 requests are sent instead of 3

The sort algorithm was not pushing back the instances with errors (no result). This is fixed.

In the master branch, instances which return an error message and nothing are erronously seen as a valid. This is fixed.

For "Search response time":
* Some instances return results only from the wiki* engines: this commit expect at least one result of a generic engine (not a wiki* engine).
* 5 requests are sent instead of 3

The sort algorithm was not pushing back the instances with errors (no result). This is fixed.


CheckResultByTheme = {
'simple': CheckResult(
results=etree.XPath("//div[@id='urls']//article"),
engines=etree.XPath("//div[contains(@class, 'engines')]/span"),
engines=etree.XPath(".//div[contains(@class, 'engines')]/span"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this commit, the list of engine names were per page instead of per result as expected.

print(search_url, '(', theme, ')')
check_result = CheckResultByTheme[theme]
default_params = {'theme': theme}
default_params = {'theme': 'simple'}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since all instances are SearXNG forks, we can safely keep only the simple theme.

@dalf dalf requested a review from unixfox September 23, 2023 12:20
}

const CompareFunctionCriterias = {
'http.status_code': (a, b) => -compareTool(a, b, null, 'http', 'status_code'),
'error': (a, b) => -compareTool(a, b, null, 'error'),
'error_wp': (a, b) => compareTool(a, b, null, 'timing', 'search_wp', 'error'),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since a long time, there is no more test on the wikipedia engine : remove dead code.

@unixfox
Copy link
Member

unixfox commented Sep 23, 2023

Good for merging thank you.

@dalf dalf merged commit 7b94622 into searxng:master Sep 23, 2023
4 checks passed
@dalf dalf deleted the update branch September 23, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants