Skip to content

Ranking rejects the right release when the title has an apostrophe or a subtitle after ". " or " - " #466

Closed

Description

@kikootwo

Search scores these releases 0 (matchScore 0, rejected at word coverage) although they are the requested book. Word coverage applies in both modes, so automatic and interactive search both reject them. The cases come from a report in #223 (French library). Measured on main with #459 (the #223 fix) merged; it does not change them.

Request title Release name matchScore
L'intruse L.Intruse.Freida.McFadden.2026.FR.[Mp3.128.Kbps]-NOTAG 0
Changer l'eau des fleurs Changer.L.Eau.Des.Fleurs.Valerie.Perrin.2022.FR.[M4B.128.kbps]-AG404 0
L'Héritage Cycle.de.l.Heritage.T04.L.Heritage.Christopher.Paolini.2020.FR.[MP3.64kbps]-LiesKey 0
Ender's Game Enders.Game.Orson.Scott.Card.MP3 0
Primal Hunter 1. Une aventure de LitRPG Primal.Hunter.T01.Zogarth.2024.FR.[MP3.128.KBPS]-NOTAG 0
C'était ça ou mourir - Prix du Roman FNAC 2026 C.Etait.Ca.Ou.Mourir.Thelyson.Orelien.2026.FR.[MP3.64.kbps]-KIKI 0

Two causes, both in scoreMatch (src/lib/utils/ranking-algorithm.ts):

  1. Apostrophes. normalizeForMatching (src/lib/utils/match-normalize.ts) keeps the apostrophe, so the request word is l'intruse or ender's while the release has l intruse or enders. The word-coverage check then fails.
  2. Subtitles after ". " or " - " in the request. Only text in brackets or after a colon is treated as an optional subtitle, so the subtitle words are required. The same subtitle after a colon passes: "Primal Hunter 1: Une aventure de LitRPG" against the release above scores 33.3. Splitting at ". " and " - " the way the colon is split fixes these rows. Since fix: automatic search stops grabbing the wrong book (stricter title and author matching) #459, a bare number right before such a split is read as the series position (Die Tribute von Panem 1. Tödliche Spiele matches Die Tribute von Panem - Tödliche Spiele); the subtitle words are still required.

Expected: each release above clears word coverage and scores like the same title without the apostrophe or with a colon subtitle.

Notes:

  • Search fails for titles containing apostrophes; add a punctuation-stripped query variation #316 covers the search query side (a query variation without apostrophes). This issue is the ranking side: matching the release names that come back.
  • Folding the apostrophe in normalizeForMatching also changes the words src/lib/integrations/audible-series-rank.ts matches. Bulk Import grouping keys do not change: keyPart in src/lib/utils/bulk-import-keys.ts already drops every character that is not a letter or digit, so L'intruse keys as lintruse either way.
  • Treating " - " as a subtitle split needs care: some titles contain a dash that is part of the title.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions