docs(search): document eventual-consistency model; drop stale Task 2 note

This commit is contained in:
2026-06-02 12:15:18 +02:00
parent 4bafac397a
commit fac4b703ff
+7 -1
View File
@@ -1,4 +1,10 @@
//! Full-text search over catalogue objects, backed by Meilisearch.
//!
//! This crate provides the search *capability* plus a `reindex_all` rebuild path.
//! On-write index sync (calling `index_object`/`remove_object` after a catalogue
//! mutation commits) is wired at the API/service layer (Plan 7+). Meilisearch is not
//! transactional with Postgres, so the index is eventually consistent; `reindex_all`
//! is the recovery path.
use db::Db;
use domain::{CatalogueObject, ObjectId};
@@ -140,7 +146,7 @@ impl SearchClient {
.collect()
}
/// Rebuild the whole index from the database. (build_document is filled in Task 2.)
/// Rebuild the whole index from the database (clears then re-adds all objects).
pub async fn reindex_all(&self, db: &Db) -> Result<(), SearchError> {
let index = self.client.index(&self.index_uid);