๐Ÿ“ checkpoint_v7_4_1.md

ISE Project โ€” v7.4 โ†’ v7.4.1#5 Checkpoint

Context: Session covered a large ranking/search-quality overhaul across ISE's three search surfaces (post search, ISEpdf, ISEmisc), following on from an earlier session that fixed a Dev/Live rsync throughput problem and an ISEpdf crash (BASE_URL bug).

What changed, in order

v7.4 (initial pass)

v7.4.1 (bugfix round after PDFIndexer.py's own fix regressed)

v7.4.1#2 through #5 (real ranking bugs, found via Andrew's live QA)

  1. Crash โ€” RankingEngine.py's rules used result.get(key, ""), which only falls back on a missing key, not a present-but-None one. Orphaned PDF attachments (no resolvable topic) have subject/text/board_name explicitly None, so .lower() crashed every search that touched one. Fixed across 5 rules.
  2. "Chemistry" search didn't surface the actual chemistry book โ€” occurrences was len(matched_terms), which is always 1 for a single-word query regardless of how saturated the document is. Switched to page_count (pages actually matched).
  3. That fix immediately hit a plateau bug โ€” OccurrenceRule's point formula capped out by ~page 7, so a 12-page and 62-page match scored identically. Widened the cap (35โ†’80 points) โ€” helped, but incompletely.
  4. RecencyRule was overriding real content matches โ€” its swing (up to 29 points) was large enough that a newer, smaller document beat an older, larger match. Scaled Recency to 1/4 weight for PDF.
  5. The real, permanent fix โ€” any fixed additive cap on Occurrence was always going to plateau eventually; a sufficiently dense document (PIHKAL, per Andrew: "packed full of every Phenethylamine invented") still hit the raised ceiling. Rebuilt Occurrence to score by coverage โ€” matched pages รท the document's own total page count (added total_pages to PDFsearch.py's result data from pdf_store.json) โ€” which has no ceiling problem at any document size.

Current state

Style/working notes for this thread