Mercurial > p > roundup > code
diff roundup/hyperdb.py @ 692:0521ddc7bb31 search_indexing-0-4-2-branch
Miscellaneous changes.
cgi_client.py
removed search link for the time being
moved rendering of matches to htmltemplate
hyperdb.py
filtering of nodes on full text search incorporated in filter method
roundupdb.py
added paramater to call of filter method
roundup_indexer.py
added search method to RoundupIndexer class
| author | Roche Compaan <rochecompaan@users.sourceforge.net> |
|---|---|
| date | Fri, 19 Apr 2002 19:54:42 +0000 |
| parents | e0a1cc7538e9 |
| children | 250d0d517f64 |
line wrap: on
line diff
--- a/roundup/hyperdb.py Mon Apr 15 23:25:16 2002 +0000 +++ b/roundup/hyperdb.py Fri Apr 19 19:54:42 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: hyperdb.py,v 1.59 2002-03-12 22:52:26 richard Exp $ +# $Id: hyperdb.py,v 1.59.2.1 2002-04-19 19:54:42 rochecompaan Exp $ __doc__ = """ Hyperdatabase implementation, especially field types. @@ -796,7 +796,8 @@ return l # XXX not in spec - def filter(self, filterspec, sort, group, num_re = re.compile('^\d+$')): + def filter(self, search_matches, filterspec, sort, group, + num_re = re.compile('^\d+$')): ''' Return a list of the ids of the active nodes in this class that match the 'filter' spec, sorted by the group spec and then the sort spec @@ -886,6 +887,14 @@ l.append((nodeid, node)) l.sort() + # filter based on full text search + if search_matches: + k = [] + for v in l: + if search_matches.has_key(v[0]): + k.append(v) + l = k + # optimise sort m = [] for entry in sort: @@ -1097,6 +1106,9 @@ # # $Log: not supported by cvs2svn $ +# Revision 1.59 2002/03/12 22:52:26 richard +# more pychecker warnings removed +# # Revision 1.58 2002/02/27 03:23:16 richard # Ran it through pychecker, made fixes #
