Search reads more than the name: summary, places, author and land unit, strongest matches first

Each row's search words come in four tiers (name and abbreviation, author, the full names of
the states, provinces and countries plus where it starts and ends and the land unit or body its
record names, and the summary). Typed words match at the start of words in any order, without
regard to case, accents or apostrophes, and the strongest matches come first. A row that matched
only beyond its name says where in one quiet line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-19 14:04:13 -07:00
1 parent ffc342b590
commit 3ff2281129
6 files changed
+453 -15

No files matched your search

+2 -1
View File
@@ -351,7 +351,8 @@ class PageTopsTest(unittest.TestCase):
_, _, body, _ = regions.region_page("us-co", recs, SITE)
body = str(body)
self.assertLess(body.index('class="browse__list"'), body.index('class="browse-about"'))
self.assertNotIn("percent", body)
# (the words a row's search reads, in its data-search, are not the page's text)
self.assertNotIn("percent", re.sub(r' data-search="[^"]*"', "", body))
def test_every_page_head_is_compact(self):
css = read(WEB, "assets", "style.css")