Mercurial > p > roundup > code
diff roundup/backends/back_tsearch2.py @ 3076:2817a4db901d
Change indexer_common.search() to take a list of nodeids...
...instead of a dictionary (with random keys) from getHits(). This
removes another Python 2.1 incompatility (using dict() and
enumerate()) and removes the need for some code in
indexer_rdbms.find().
| author | Johannes Gijsbers <jlgijsbers@users.sourceforge.net> |
|---|---|
| date | Wed, 05 Jan 2005 22:14:21 +0000 |
| parents | b0f5ea4e4dff |
| children | d4d77d992876 |
line wrap: on
line diff
--- a/roundup/backends/back_tsearch2.py Wed Jan 05 22:10:28 2005 +0000 +++ b/roundup/backends/back_tsearch2.py Wed Jan 05 22:14:21 2005 +0000 @@ -98,14 +98,14 @@ if not search_terms: return None - nodeids = self.tsearchQuery(klass.classname, search_terms) + hits = self.tsearchQuery(klass.classname, search_terms) designator_propname = {} for nm, propclass in klass.getprops().items(): if _isLink(propclass): - nodeids.extend(self.tsearchQuery(propclass.classname, search_terms)) + hits.extend(self.tsearchQuery(propclass.classname, search_terms)) - return dict(enumerate(nodeids)) + return hits def tsearchQuery(self, classname, search_terms): query = """SELECT id FROM _%(classname)s
