Skip to content

Commit

Permalink
fleshed out search grammer, could use more.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Pelletier committed Apr 26, 2001
1 parent b22f027 commit 093e152
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions help/ZCatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,32 @@ def searchResults(REQUEST=None, **kw):
Search the catalog. Search terms can be passed in the REQUEST
or as keyword arguments.
XXX search grammar, how terms are combined, special search
terms, format of returned results XXX
Search queries consist of a mapping of index names to search
parameters. You can either pass a mapping to searchResults as
the variable 'REQUEST' or you can use index names and search
parameters as keyword arguments to the method, in other words::
searchResults(title='Elvis Exposed',
author='The Great Elvonso')
is the same as::
searchResults({'title' : 'Elvis Exposed',
'author : 'The Great Elvonso'})
In these examples, 'title' and 'author' are indexes. This
query will return any objects that have the title *Elvis
Exposed* AND also are authored by *The Great Elvonso*. Terms
that are passed as keys and values in a searchResults() call
are implicitly ANDed together. To OR two search results, call
searchResults() twice and add concatenate the results like this::
results = ( searchResults(title='Elvis Exposed') +
searchResults(author='The Great Elvonso') )
This will return all objects that have the specified title OR
the specified author.
"""

Expand Down

0 comments on commit 093e152

Please sign in to comment.