Browse Source

Fix: Whoosh search - Remove old keyword

master
Dirk Alders 2 months ago
parent
commit
30433d8733
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      pages/page.py
  2. 1
    1
      pages/search.py

+ 1
- 1
pages/page.py View File

129
     def is_available(self):
129
     def is_available(self):
130
         is_a = os.path.isfile(self.filename)
130
         is_a = os.path.isfile(self.filename)
131
         if not is_a:
131
         if not is_a:
132
-            logger.info("page.is_available: Not available - %s", self.filename)
132
+            logger.debug("page.is_available: Not available - %s", self.filename)
133
         return is_a
133
         return is_a
134
 
134
 
135
     @property
135
     @property

+ 1
- 1
pages/search.py View File

72
     )
72
     )
73
     with ix.writer() as w:
73
     with ix.writer() as w:
74
         logger.info('Adding document with id=%s to the search index.', data.get('id'))
74
         logger.info('Adding document with id=%s to the search index.', data.get('id'))
75
-        w.add_document(**data)
75
+        w.update_document(**data)
76
         for key in data:
76
         for key in data:
77
             logger.debug('  - Adding %s=%s', key, repr(data[key]))
77
             logger.debug('  - Adding %s=%s', key, repr(data[key]))
78
 
78
 

Loading…
Cancel
Save