Page MenuHomePhabricator

Ensure ES queries don't return negative score
Closed, ResolvedPublic

Description

The current version of Elastic is ok with clauses returning negative scores, but future versions deprecate & forbid it.
We have an ugly workaround in place (required for the current version) that may return negative scores in certain cases.
This prevents updating elastic to a more recent version (which in turn would be needed to remove the workaround)
We should change the existing code to ensure that there are no clauses potentially returning negative scores.

Acceptance criteria:

  • No ES clauses in the MediaSearch query builder profile return a negative score

Event Timeline

Change 651531 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Ensure ES queries don't return negative score

https://gerrit.wikimedia.org/r/651531

Change 651531 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Ensure ES queries don't return negative score

https://gerrit.wikimedia.org/r/651531

Etonkovidova added a subscriber: Etonkovidova.

Checked - seems to be ok. Testing various queries via cirrusDumpResult, e.g.
https://commons.wikimedia.org/w/index.php?title=Special:MediaSearch&cirrusDumpResult=&q=%22mavetuna*cat%22&ns0=1, there were never failures, timeouts, or negative scores.