feat(api): on-write search reindex after catalogue writes (#17)
Wire best-effort Meilisearch index sync into the admin write paths (create/update/delete/set_fields/set_visibility). Adds SearchClient::sync_object (reindex if the object exists, remove if gone — one uniform path), an optional AppState.search client, and a reindex helper that logs failures via tracing without failing the committed write. Server gains MEILI_URL/MEILI_MASTER_KEY/MEILI_INDEX config; search stays disabled (no-op) when unset. reindex_all remains the recovery path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Generated
+4
@@ -82,6 +82,7 @@ dependencies = [
|
||||
"db",
|
||||
"domain",
|
||||
"http-body-util",
|
||||
"search",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sqlx",
|
||||
@@ -90,7 +91,9 @@ dependencies = [
|
||||
"tower",
|
||||
"tower-sessions",
|
||||
"tower-sessions-sqlx-store",
|
||||
"tracing",
|
||||
"utoipa",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1969,6 +1972,7 @@ dependencies = [
|
||||
"domain",
|
||||
"reqwest",
|
||||
"rpassword",
|
||||
"search",
|
||||
"serde_json",
|
||||
"sqlx",
|
||||
"temp-env",
|
||||
|
||||
Reference in New Issue
Block a user