From 30433d8733d5cdd02bc62135ed81216ce34b1348 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Sun, 13 Oct 2024 16:31:59 +0200 Subject: [PATCH] Fix: Whoosh search - Remove old keyword --- pages/page.py | 2 +- pages/search.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/page.py b/pages/page.py index a770c22..75f809d 100644 --- a/pages/page.py +++ b/pages/page.py @@ -129,7 +129,7 @@ class page_data(object): def is_available(self): is_a = os.path.isfile(self.filename) if not is_a: - logger.info("page.is_available: Not available - %s", self.filename) + logger.debug("page.is_available: Not available - %s", self.filename) return is_a @property diff --git a/pages/search.py b/pages/search.py index 130d1d4..d7e4a34 100644 --- a/pages/search.py +++ b/pages/search.py @@ -72,7 +72,7 @@ def add_item(ix, pw: page_wrapped): ) with ix.writer() as w: logger.info('Adding document with id=%s to the search index.', data.get('id')) - w.add_document(**data) + w.update_document(**data) for key in data: logger.debug(' - Adding %s=%s', key, repr(data[key]))