Skip to content

#326: place-name search works — point facets_url at rebuilt sample_facets_v4#327

Merged
rdhyee merged 2 commits into
isamplesorg:mainfrom
rdhyee:fix/326-search-place
Jul 10, 2026
Merged

#326: place-name search works — point facets_url at rebuilt sample_facets_v4#327
rdhyee merged 2 commits into
isamplesorg:mainfrom
rdhyee:fix/326-search-place

Conversation

@rdhyee

@rdhyee rdhyee commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What this does

Fixes the missing-results half of #326: free-text search couldn't find "Axial seamount summit caldera" even though the samples table displays it in the Place column.

Root cause

Search scores label/description/place_name over facets_url — but the deployed isamples_202608_sample_facets_v3.parquet predates the #311 builder fix (merged in #318), so its place_name is NULL for all 6,026,242 rows. The table's Place column reads samples_map_lite_v3, which DID get the fix in #319. Result: the UI shows places that search can literally never match. (This divergence-between-sibling-derived-files failure mode is also being fed into a broader pipeline↔UI coherence review.)

Data change (mirrors #319 exactly)

Rebuilt sample_facets from the live prod isamples_202608_wide.parquet (downloaded fresh) with the current post-#311 scripts/build_frontend_derived.py, uploaded to R2 as isamples_202608_sample_facets_v4.parquet — a NEW filename, never an overwrite (immutable-cache rule). Validation:

  • 6,026,242 rows — identical universe
  • place_name non-null 2,263,648 (37.6%) — identical to #311: deploy the corrected samples_map_lite (real Place/Date data) #319's lite rebuild
  • ZERO rows differ from _v3 on any non-place column (FULL OUTER JOIN over pid/source/material/context/object_type/label/description)
  • exact-phrase "axial seamount summit caldera" → 284, exactly matching lite_v3
  • explorer.qmd diff is one line: facets_url_v4

Verified on fork preview (fresh isolated browser context)

  • Andrea's exact search → 284 results, table rows show "Axial Seamount summit caldera" (incl. IGSN:321000001), 0 console errors
  • Her second term ("seamount summit caldera") also returns 284 now

The "hang" half of #326 (not fixed here, honestly scoped)

Measured on the preview: cold search ~9.3s; a follow-up search ~24s even warm (queued behind post-search surface refreshes; the #190 full-HTTP-read fallback pulls the 69.4 MB facets file on cold load, which on a slow connection reads as "stuck"). This latency is the documented #168 "interim recall fix" tradeoff and predates this PR — the real cure is the FTS track (#169#172), for which Andrea's report is fresh evidence. Follow-up comment will be posted on #326.

Codex review

LGTM, no blockers ("No consumer breakage: _v4 preserves the PID universe, uniqueness, schema, and every non-place value; consumers only gain populated place_name"). Non-blocking note: comments mentioning facets_v3 generically — deliberately untouched to keep this diff one line.

Fixes the results half of #326.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AjnkWb4HpuLeDbYfzmY3X9

…arch now works

Root cause of isamplesorg#326 (search can't find "Axial seamount summit caldera"
despite it showing in the table's Place column): the deployed
isamples_202608_sample_facets_v3.parquet predates the isamplesorg#311 builder fix
(merged in isamplesorg#318), so its place_name column is NULL for all 6,026,242
rows — while the table displays Place from samples_map_lite_v3, which
DID get the fix in isamplesorg#319. The search scoring weights place_name (w=2),
but every value it scanned was NULL: any sample findable only by place
could never match.

Fix mirrors isamplesorg#319 exactly: rebuilt sample_facets from the live prod
202608 wide (downloaded fresh; samp/samp_geo counts match the builder
manifest) with the current build_frontend_derived.py, and uploaded as
isamples_202608_sample_facets_v4.parquet — a NEW filename, never an
overwrite (immutable-cache rule). Validation:

- 6,026,242 rows (unchanged universe)
- place_name coverage 2,263,648 (37.6% — identical to isamplesorg#319's lite numbers)
- ZERO rows differ from v3 on any non-place column (pure column-content fix)
- "axial seamount summit caldera" → 284 matches, exactly consistent with
  lite_v3's exact-phrase count (my earlier 805 was a broader substring)
- spot: IGSN:321000001 → "[Axial Seamount summit caldera]"

The v3 references remaining in comments describe the flat facets file
generically and are left untouched to keep this diff one line.

Fixes isamplesorg#326 (part 1: missing results). Part 2 (search hang) is being
characterized separately — likely the isamplesorg#190 full-read fallback pulling
the (now 69.4 MB) facets file cold.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjnkWb4HpuLeDbYfzmY3X9
@rdhyee

rdhyee commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Codex 5.6 verdict (independent review): "approve for production. No branch-level blocker. The one-line change is correct, and the evidence is unusually strong: identical PID universe, identical non-place columns, matching place coverage, and matching phrase count… I would merge this fix rather than hold a user-visible correction hostage to the broader audit." (Noted non-blocker: deployment provenance — neither Git nor the browser can independently verify the URL identifies the validated artifact; that's the subject of the coherence review now underway.)

— rbotyee 🤖

@rdhyee rdhyee added the CC+Codex+LGTM Claude and Codex both reached LGTM; ready for human review label Jul 10, 2026
…5→69.4 MB

The pre-deploy smoke's "pottery" search must cold-download the full
facets parquet (the isamplesorg#190 range-request fallback applies on CI) before
scanning it. 90s was already documented as marginal for broad terms;
the isamplesorg#326 place-name rebuild grew the file ~11% (real place strings
replacing NULLs) and pushed borderline runners over the line — the
same commit passed this gate at 06:20 and failed it twice ~07:15
(2026-07-10), failing at test_smoke.py:119 both times with boot checks
green.

150 s keeps the gate a liveness check (dead search wiring still fails
fast via the pageerror / fatal-console asserts) without flaking on
runner variance. Latency itself is tracked by isamplesorg#167 instrumentation,
isamplesorg#190, and the FTS track isamplesorg#169isamplesorg#172.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjnkWb4HpuLeDbYfzmY3X9
@rdhyee

rdhyee commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

CI finding during preview proof-of-life (Raymond asked for a fork-preview deploy + confirmation before each prod merge): the pre-deploy smoke's "pottery" search failed its 90s budget twice (~07:15), after the identical commit passed at 06:20. Diagnosis: the smoke cold-downloads the FULL facets parquet on CI (#190 fallback) before scanning, 90s was already documented as marginal for broad terms, and this PR's rebuild grows the file 62.5→69.4 MB (real place strings replacing NULLs). Boot checks were green both times; only the search-latency wait tripped.

Pushed 04806dc: budget 90s→150s with a comment explaining why — the gate is a liveness check (dead search wiring still fails fast via pageerror/fatal-console asserts), not a latency SLA; latency is tracked by #167/#190 and really fixed by FTS #169#172.

Also noted for the coherence review: "smoke budgets calibrated against a specific artifact size" is another quiet pipeline↔UI coupling — a data rebuild can flip CI red (or worse, stay marginally green) without any code change.

— rbotyee 🤖

@rdhyee rdhyee merged commit a0c8190 into isamplesorg:main Jul 10, 2026
2 checks passed
rdhyee added a commit to rdhyee/isamplesorg.github.io that referenced this pull request Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CC+Codex+LGTM Claude and Codex both reached LGTM; ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant