changeset 5039:636ba2c195be

catch IndexerError and log a warning we don't want that one problematic document kills the whole indexing run
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 26 Aug 2009 14:07:46 +0200
parents 6035cb0345db
children d50ca8a73057
files MoinMoin/search/Xapian/indexing.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/Xapian/indexing.py	Wed Aug 26 14:05:42 2009 +0200
+++ b/MoinMoin/search/Xapian/indexing.py	Wed Aug 26 14:07:46 2009 +0200
@@ -440,7 +440,11 @@
 
             self._add_fields_to_document(request, doc, fields, multivalued_fields)
 
-            connection.replace(doc)
+            try:
+                connection.replace(doc)
+            except xappy.IndexerError, err:
+                logging.warning("IndexerError at %r %r %r (%s)" % (
+                    wikiname, pagename, revision, str(err)))
 
         return bool(doc)