Skip to content

Commit 95890ad

Browse files
author
Justus Pendleton
committed
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.
1 parent 6ced194 commit 95890ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

roundup/backends/indexer_xapian.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: indexer_xapian.py,v 1.4 2006-02-10 00:16:13 richard Exp $
1+
#$Id: indexer_xapian.py,v 1.5 2007-09-05 18:46:39 jpend Exp $
22
''' This implements the full-text indexer using the Xapian indexer.
33
'''
44
import re, os
@@ -32,7 +32,7 @@ def save_index(self):
3232
def close(self):
3333
'''close the indexing database'''
3434
pass
35-
35+
3636
def rollback(self):
3737
if not self.transaction_active:
3838
return
@@ -92,7 +92,7 @@ def add_text(self, identifier, text, mime_type='text/plain'):
9292
word = match.group(0)
9393
if self.is_stopword(word):
9494
continue
95-
term = stemmer.stem_word(word)
95+
term = stemmer(word)
9696
doc.add_posting(term, match.start(0))
9797
if docid:
9898
database.replace_document(docid, doc)
@@ -103,7 +103,7 @@ def find(self, wordlist):
103103
'''look up all the words in the wordlist.
104104
If none are found return an empty dictionary
105105
* more rules here
106-
'''
106+
'''
107107
if not wordlist:
108108
return {}
109109

0 commit comments

Comments
 (0)