diff --git a/scene_search/meili.py b/scene_search/meili.py index e2da084..5fc3309 100644 --- a/scene_search/meili.py +++ b/scene_search/meili.py @@ -76,6 +76,19 @@ class Meili: json=documents, )) + def update_documents(self, documents: list[dict]) -> None: + """Partially update existing documents without replacing omitted fields.""" + if not documents: + return + self.ensure_index() + self._check( + self.session.post( + f"{self.url}/indexes/{self.index}/documents", + params={"primaryKey": "id"}, + json=documents, + ) + ) + def delete_jellyfin_libraries(self, library_ids: list[str]) -> None: if not library_ids: return