[Zope] Suppressing dupes in a concatenated ZCatalog query.
abgillette at allmail.net
abgillette at allmail.net
Thu Jul 28 16:57:45 EDT 2005
Hi All,
I have a ZCatalog with two text indexes, news_subj and news_text. Each
ZCatalog item also has a unique numeric ID.
I'd like to search news_subj and news_text simultaneously, with the
results checked for duplicates. In other words, if catalog item 1001 has
the word "foobar" in both the news_subj and news_text fields, I only
want it to show up once in my search results.
Here's what I've got, so far:
<dtml-in expr="mp_catalog({'news_text':'foobar'}) +
mp_catalog({'news_subj':'foobar'})">
<dtml-var news_subj><br>
</dtml-in>
This correctly searches both fields, but, when "foobar" appears in both
news_subj and news_text, the result is displayed twice.
Can anyone give me a pointer on suppressing dupes in a concatenated
ZCatalog query? I'm sure there's an easy answer, but I haven't been able
to find it.
Thanks in advance,
Aaron
More information about the Zope
mailing list