• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rero / rero-mef / 29261220958
87%
staging: 87%

Build:
Build:
LAST BUILD BRANCH: wep-fixes
DEFAULT BRANCH: staging
Ran 13 Jul 2026 03:16PM UTC
Jobs 1
Files 199
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Jul 2026 03:10PM UTC coverage: 87.306% (-0.06%) from 87.37%
29261220958

push

github

rerowep
fix(mef): sort relevance descending, not ascending

* RECORDS_REST_DEFAULT_SORT's "relevance" value was missing the "-"
  prefix invenio_records_rest.sorter.parse_sort_field needs for
  descending order. Traced a real /agents/mef/ request end to end
  (Search.execute()) and confirmed Elasticsearch was actually receiving
  "sort": [{"_score": {"order": "asc"}}] -- the best matches were
  sorted to the last page instead of the first, no matter how good the
  underlying query or boosting was
* this was the actual cause of "Victor Hugo"-style searches looking
  broken (an engraver's biography that merely mentions "Victor Hugo"
  ranked above the actual person): confirmed via _explain against the
  production index that plain, unboosted BM25 already scores the
  correct record ~32x higher than the incidental biographical mention
  (22.4 vs 0.69) -- once sorted descending, no extra field-scoping is
  needed to surface it
* revert the _DEFAULT_SEARCH_FIELDS/_discover_default_search_fields
  boosting added in the previous commit: it widened the margin further
  (91 vs 0.69) but added real complexity (mapping-file parsing,
  boost-tier categorization, a dependency on api_mef._INDEX_ONLY_FIELDS)
  for a problem the sort fix alone already solves
* _default_parser is back to its simple, unrestricted form; drop the
  now-obsolete field-discovery test

Co-Authored-by: Peter Weber <peter.weber@rero.ch>

5468 of 6263 relevant lines covered (87.31%)

0.87 hits per line

Coverage Regressions

Lines Coverage ∆ File
9
76.92
-9.74% rero_mef/query.py
4
88.38
-0.06% rero_mef/api_mef.py
Jobs
ID Job ID Ran Files Coverage
1 29261220958.1 13 Jul 2026 03:16PM UTC 199
87.31
GitHub Action Run
Source Files on build 29261220958
  • Tree
  • List 199
  • Changed 4
  • Source Changed 4
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29261220958
  • eec1668a on github
  • Prev Build on mef-test (#29128008235)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc