Skip to content

Commit f20365a

Browse files
author
Richard Jones
committed
We're indexing numbers now, and _underscore words
1 parent bb6c4df commit f20365a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

roundup/indexer.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# that promote freedom, but obviously am giving up any rights
1515
# to compel such.
1616
#
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 $
1818
'''
1919
This module provides an indexer class, RoundupIndexer, that stores text
2020
indices in a roundup instance. This class makes searching the content of
@@ -202,7 +202,7 @@ def find(self, wordlist):
202202
return {}
203203
return hits
204204

205-
segments = "ABCDEFGHIJKLMNOPQRSTUVWXYZ#-!"
205+
segments = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ#_-!"
206206
def load_index(self, reload=0, wordlist=None):
207207
# Unless reload is indicated, do not load twice
208208
if self.index_loaded() and not reload:
@@ -263,7 +263,7 @@ def save_index(self):
263263
open(self.indexdb+'-','wb').write(zlib.compress(marshal.dumps(dbfil)))
264264

265265
# The hard part is splitting the word dictionary up, of course
266-
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ#"
266+
letters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ#_"
267267
segdicts = {} # Need batch of empty dicts
268268
for segment in letters:
269269
segdicts[segment] = {}
@@ -301,6 +301,11 @@ def index_loaded(self):
301301

302302
#
303303
#$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+
#
304309
#Revision 1.4 2002/07/09 03:02:52 richard
305310
#More indexer work:
306311
#- all String properties may now be indexed too. Currently there's a bit of

0 commit comments

Comments
 (0)