[Zope] How to join/add ZCatalog.searchResults?

Michael Gutmann gutmann@uni-duesseldorf.de
Fri, 15 Oct 1999 11:35:59 +0200


Problem: I need to combine a search in two fields (title, data) with or.
(standard is and, and since now there is no chance to change this, afaik?)

A solution could be, to make two separate searches and join the 
searchResults, something like this:

<dtml-let title_search="Catalog.searchResults({'title':mysearchfield})"
          data_search="Catalog.searchResults({'data':mysearchfield})"
          complete_search="title_search + data_search">

and then iterate over the concatenated list:

<dtml-in complete_search size=20 start=query_start>

Well, I'd love to try this, but "title_search + data_search" doesn't
work. 

Error Type: TypeError
Error Value: __add__ nor __radd__ defined for these operands

Any idea how to concatenate those two searchResults?

Thanks in advance,

Michael
gutmann@uni-duesseldorf.de