Skip to main content

sync_page_search

Function sync_page_search 

Source
pub async fn sync_page_search(tenant_slug: &str, page: &Page)
Expand description

Keep the external search index in step with a saved page: a page in a public status (published or archived) is indexed, any other status is removed (so draft / scheduled / expired pages drop out of search — archived pages now STAY findable). No-op when no external crate::search::SearchBackend is installed — the Postgres FTS path needs no maintained index. Dispatched via the queue when a sink is set, else run inline. Best-effort.