Message4622
-re.findall(r'\b\w{2,25}\b', request.search_text), klass)
+re.findall(r'[\w_%]{2,25}', request.search_text), klass)
\w already includes _, so [\w%] is enough here.
There are also a few deprecated/obsolete idioms in the patches:
+if word.find('_') == -1 and word.find('%') == -1:
These should use the "in" operator.
+if not entries.has_key(word):
This (and others) should use "not in".
+raise ValueError, 'Index is corrupted: re-generate it'
This should use "raise ValueError(...)"
The patch(es) should also include some documentation that explains how
to use this new feature.
We also had some problem[0] with case-sensitive searches, however I'm
not sure if this is related to this issue.
[0]: http://psf.upfronthosting.co.za/roundup/meta/issue298 |
|
Date |
User |
Action |
Args |
2012-08-22 07:01:34 | ezio.melotti | set | messageid: <1345618894.52.0.53496690686.issue2550771@psf.upfronthosting.co.za> |
2012-08-22 07:01:34 | ezio.melotti | set | recipients:
+ ezio.melotti, ber |
2012-08-22 07:01:34 | ezio.melotti | link | issue2550771 messages |
2012-08-22 07:01:33 | ezio.melotti | create | |
|