Mercurial > p > roundup > code
diff roundup/backends/indexer_rdbms.py @ 3544:5cd1c83dea50
Features and fixes.
Feature:
- trackers may configure custom stop-words for the full-text indexer
Fixed:
- fixes in scripts/import_sf.py
- fix some unicode bugs in roundup-admin import
- Xapian indexer wasn't actually being used
- fix indexing of message content on roundup-admin import
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 06 Feb 2006 21:00:47 +0000 |
| parents | 89a5c8e86346 |
| children | f12722c7b9ee |
line wrap: on
line diff
--- a/roundup/backends/indexer_rdbms.py Mon Feb 06 02:35:47 2006 +0000 +++ b/roundup/backends/indexer_rdbms.py Mon Feb 06 21:00:47 2006 +0000 @@ -1,14 +1,15 @@ -#$Id: indexer_rdbms.py,v 1.11 2005-09-28 05:42:23 richard Exp $ +#$Id: indexer_rdbms.py,v 1.12 2006-02-06 21:00:47 richard Exp $ ''' This implements the full-text indexer over two RDBMS tables. The first is a mapping of words to occurance IDs. The second maps the IDs to (Class, propname, itemid) instances. ''' import re -from indexer_common import Indexer, is_stopword +from roundup.backends.indexer_common import Indexer as IndexerBase -class Indexer(Indexer): +class Indexer(IndexerBase): def __init__(self, db): + IndexerBase.__init__(self, db) self.db = db self.reindex = 0 @@ -62,7 +63,7 @@ for w in re.findall(r'(?u)\b\w{2,25}\b', text)] words = {} for word in wordlist: - if is_stopword(word): continue + if self.is_stopword(word): continue if len(word) > 25: continue words[word] = 1 words = words.keys()
