Skip to content

Commit

Permalink
Unscrewed Globbing dependencies in text index, fixed non-globbing
Browse files Browse the repository at this point in the history
vocabularies.  redid Lexicon interface.
  • Loading branch information
Michel Pelletier committed Mar 25, 2000
1 parent 7cd5167 commit 884298b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Catalog.py
Expand Up @@ -533,6 +533,8 @@ def searchResults(self, REQUEST=None, used=None,
type(''): Query.String,
}, **kw):



# Get search arguments:
if REQUEST is None and not kw:
try: REQUEST=self.REQUEST
Expand Down
7 changes: 5 additions & 2 deletions Vocabulary.py
Expand Up @@ -156,8 +156,11 @@ def __init__(self, id, title='', globbing=None):
def query(self, pattern):
""" """
result = []
for x in self.lexicon.query(pattern):
result.append(self.lexicon._inverseLex[x])
for x in self.lexicon.get(pattern):
if self.globbing:
result.append(self.lexicon._inverseLex[x])
else:
result.append(pattern)
return result


Expand Down
2 changes: 1 addition & 1 deletion ZCatalog.py
Expand Up @@ -471,7 +471,7 @@ def searchResults(self, REQUEST=None, used=None,
Search terms can be passed in the REQUEST or as keyword
arguments.
"""

return apply(self._catalog.searchResults,
(REQUEST,used, query_map), kw)

Expand Down

0 comments on commit 884298b

Please sign in to comment.