[Zope] joining zcatalog search results

Luton, Alex ALuton@rcseng.ac.uk
Tue, 12 Nov 2002 13:22:48 -0000


Hi,

I have a fairly simple query about processing zcatalog search results. I
want to search a zcatalog of dtml pages based on their text content and
title. At the moment, I'm doing  two separate searches and concatenating
the results using a script, much the same as the example in the zope
book. When the two results are concatenated duplicates may occur, so I'm
looking for a way to join the two correctly. This must be a fairly
common requirement, but I can't find any similar examples. Here's my
python script:

Parameters : query

titles = context.catalog({'title' : query})
princes = context.catalog({'PrincipiaSearchSource' : query})

return titles + princes

--
Alex
This e-mail and any attached files are confidential and are intended
solely for the use of the individual or entity to whom they are
addressed.

This communication represents the originators personal views and
opinions, which do not necessarily reflect those of The Royal College of
Surgeons of England.

If you are not the intended recipient, or the person responsible for
delivering the e-mail to the intended recipient, be advised that you
have received this e-mail in error, and that any use, dissemination,
forwarding, printing or copying of this e-mail is strictly prohibited.

http://www.rcseng.ac.uk

Registered Charity Number: 212808