Page MenuHomePhabricator

Change MediaQueryBuilder to use a ConstantScore query for statements queries
Closed, ResolvedPublic

Description

According to David it makes no sense to use scoring functions designed for human languages in the context of queries for strings like "P180=Q42", and we ought to use ConstantScore queries instead

Acceptance criteria:

  • if you look at http://<wiki>/w/index.php?search=SEARCH_TERM&ns6=1&mediasearch=1&cirrusDumpQuery you should see that queries for "PXXX=QYYY" are constant_score rather than match queries in the should section of query
  • if you look at http://<wiki>/w/index.php?search=SEARCH_TERM&ns6=1&mediasearch=1&cirrusDumpResult&cirrusExplain=pretty you should see that there's a "Constant scored query" section for each result where we have a match for "PXXX=QYYY"

Event Timeline

Change 612621 had a related patch set uploaded (by Cparle; owner: Cparle):
[mediawiki/extensions/WikibaseMediaInfo@master] Use ConstantScore queries for statements

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

Change 612621 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Use ConstantScore queries for statements

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

This was done, and then un-done because we found that using a match query gave us better results