diff roundup/backends/indexer_xapian.py @ 3887:c7363442cdbb

change xapian stemmer to use "new" API Fixes [SF#771414]. Thanks to Rick Benavidez for bug report, sleuthing, and patch. Though they have only recently updated the docs for python, the change apparently happened a long time ago. According to http://www.xapian.org/docs/deprecation.html the stem.stem_word syntax was deprecated in 0.9.0 and removed in 1.0. 0.9.0 was released ~2 years ago, so it is probably safe to make this change for the next roundup release.
author Justus Pendleton <jpend@users.sourceforge.net>
date Wed, 05 Sep 2007 18:46:39 +0000
parents 91c495476db3
children 7518a8ec1d55
line wrap: on
line diff
--- a/roundup/backends/indexer_xapian.py	Wed Sep 05 06:13:56 2007 +0000
+++ b/roundup/backends/indexer_xapian.py	Wed Sep 05 18:46:39 2007 +0000
@@ -1,4 +1,4 @@
-#$Id: indexer_xapian.py,v 1.4 2006-02-10 00:16:13 richard Exp $
+#$Id: indexer_xapian.py,v 1.5 2007-09-05 18:46:39 jpend Exp $
 ''' This implements the full-text indexer using the Xapian indexer.
 '''
 import re, os
@@ -32,7 +32,7 @@
     def close(self):
         '''close the indexing database'''
         pass
-  
+
     def rollback(self):
         if not self.transaction_active:
             return
@@ -92,7 +92,7 @@
             word = match.group(0)
             if self.is_stopword(word):
                 continue
-            term = stemmer.stem_word(word)
+            term = stemmer(word)
             doc.add_posting(term, match.start(0))
         if docid:
             database.replace_document(docid, doc)
@@ -103,7 +103,7 @@
         '''look up all the words in the wordlist.
         If none are found return an empty dictionary
         * more rules here
-        '''        
+        '''
         if not wordlist:
             return {}
 

Roundup Issue Tracker: http://roundup-tracker.org/