feat: implement article search with PostgreSQL full-text search #42
Reference in New Issue
Block a user
Delete Branch "feature/article-search"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements article search using Wagtail's built-in PostgreSQL full-text search backend. Replaces the nav Subscribe CTA with a search box on both desktop and mobile.
Closes #41
Changes
Backend
WAGTAILSEARCH_BACKENDSwithdatabasebackend andenglishsearch configdjango.contrib.postgres: Added toINSTALLED_APPSfor full PG FTS supportArticlePage.search_fieldswithbody_text(excludes code blocks),AutocompleteField(title),RelatedFields(tags),FilterField(category),FilterField(published_date)/search/?q=with query guards (strip/normalize, 200-char max, empty/whitespace handling), pagination preserving?q=paramupdate_indextoentrypoint.prod.shfor automated reindexing on every deployFrontend
w-48, mono font, cyan focus ring)article_card.html, shows query + result count, no-results state, paginationTests
test_newsletter_forms_render_in_nav_and_footerandtest_nav_subscribe_cta_presentfor nav changeStrict QA review complete: implementation matches Issue #41 scope and acceptance criteria. Verified search backend config, article-only query path, empty/whitespace/max-length guards, navigation + article index search UX updates, pagination query preservation, and deploy reindex hook. Full pytest suite passes in Docker (96.03% coverage) and update_index runs cleanly.