|
14 | 14 | # that promote freedom, but obviously am giving up any rights |
15 | 15 | # to compel such. |
16 | 16 | # |
17 | | -#$Id: indexer.py,v 1.5 2002-07-09 04:19:09 richard Exp $ |
| 17 | +#$Id: indexer.py,v 1.6 2002-07-09 04:26:44 richard Exp $ |
18 | 18 | ''' |
19 | 19 | This module provides an indexer class, RoundupIndexer, that stores text |
20 | 20 | indices in a roundup instance. This class makes searching the content of |
@@ -202,7 +202,7 @@ def find(self, wordlist): |
202 | 202 | return {} |
203 | 203 | return hits |
204 | 204 |
|
205 | | - segments = "ABCDEFGHIJKLMNOPQRSTUVWXYZ#-!" |
| 205 | + segments = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ#_-!" |
206 | 206 | def load_index(self, reload=0, wordlist=None): |
207 | 207 | # Unless reload is indicated, do not load twice |
208 | 208 | if self.index_loaded() and not reload: |
@@ -263,7 +263,7 @@ def save_index(self): |
263 | 263 | open(self.indexdb+'-','wb').write(zlib.compress(marshal.dumps(dbfil))) |
264 | 264 |
|
265 | 265 | # The hard part is splitting the word dictionary up, of course |
266 | | - letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ#" |
| 266 | + letters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ#_" |
267 | 267 | segdicts = {} # Need batch of empty dicts |
268 | 268 | for segment in letters: |
269 | 269 | segdicts[segment] = {} |
@@ -301,6 +301,11 @@ def index_loaded(self): |
301 | 301 |
|
302 | 302 | # |
303 | 303 | #$Log: not supported by cvs2svn $ |
| 304 | +#Revision 1.5 2002/07/09 04:19:09 richard |
| 305 | +#Added reindex command to roundup-admin. |
| 306 | +#Fixed reindex on first access. |
| 307 | +#Also fixed reindexing of entries that change. |
| 308 | +# |
304 | 309 | #Revision 1.4 2002/07/09 03:02:52 richard |
305 | 310 | #More indexer work: |
306 | 311 | #- all String properties may now be indexed too. Currently there's a bit of |
|
0 commit comments