changeset 5283:f68e18305d05

xapian indexing: cosmetical changes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 15 Nov 2009 21:54:56 +0100
parents bee5567d7084
children a83a65fcbb69
files MoinMoin/search/Xapian/indexing.py
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/Xapian/indexing.py	Sun Nov 15 16:12:50 2009 +0100
+++ b/MoinMoin/search/Xapian/indexing.py	Sun Nov 15 21:54:56 2009 +0100
@@ -273,7 +273,7 @@
         lang = None
         default_lang = page.request.cfg.language_default
 
-        # if we should stem, we check if we have stemmer for the language available
+        # if we should stem, we check if we have a stemmer for the language available
         if page.request.cfg.xapian_stemming:
             lang = page.pi['language']
             try:
@@ -292,8 +292,7 @@
         return (lang, default_lang)
 
     def _get_categories(self, page):
-        """ Get all categories the page belongs to through the old
-            regular expression
+        """ Get all categories the page belongs to through the old regular expression
 
         @param page: the page instance
         """
@@ -397,6 +396,7 @@
         mtime = page.mtime_usecs()
 
         doc = self._get_document(connection, itemid, mtime, mode)
+        logging.debug("%s %s %r" % (pagename, revision, doc))
         if doc:
             mimetype = 'text/%s' % page.pi['format']  # XXX improve this
 
@@ -507,7 +507,6 @@
 
             doc = self._get_document(connection, itemid, mtime, mode)
             logging.debug("%s %r" % (filename, doc))
-
             if doc:
                 mimetype, file_content = self.contentfilter(filename)
 
@@ -553,7 +552,7 @@
             for fname in os.listdir(self.db):
                 os.unlink(os.path.join(self.db, fname))
             mode = 'add'
- 
+
         try:
             connection = self.get_indexer_connection()
             self.touch()