Mercurial > p > roundup > code
diff roundup/backends/indexer_common.py @ 4252:2ff6f39aa391
Indexers behaviour made more consistent regarding length of indexed words...
...and stopwords (thanks Thomas Arendsen Hein, Bernhard Reiter)(issue 2550584)
| author | Bernhard Reiter <Bernhard.Reiter@intevation.de> |
|---|---|
| date | Fri, 11 Sep 2009 15:55:11 +0000 |
| parents | eddb82d0964c |
| children | 864746c0cf8d |
line wrap: on
line diff
--- a/roundup/backends/indexer_common.py Fri Sep 11 15:37:24 2009 +0000 +++ b/roundup/backends/indexer_common.py Fri Sep 11 15:55:11 2009 +0000 @@ -22,6 +22,10 @@ self.stopwords = set(STOPWORDS) for word in db.config[('main', 'indexer_stopwords')]: self.stopwords.add(word) + # Do not index anything longer than 25 characters since that'll be + # gibberish (encoded text or somesuch) or shorter than 2 characters + self.minlength = 2 + self.maxlength = 25 def is_stopword(self, word): return word in self.stopwords
