<br>If I understand correctly, this seems like searching for multiple values in one index. What I&#39;m looking to do is search for one value in multiple indexes... and get back one result even if there are True hits in more than one index.<br>
<br><div class="gmail_quote">On Mon, Jul 7, 2008 at 4:00 PM, Jonathan &lt;<a href="mailto:dev101@magma.ca">dev101@magma.ca</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
----- Original Message ----- From: &quot;Tom Von Lahndorff&quot; &lt;<a href="mailto:tom@modscape.com" target="_blank">tom@modscape.com</a>&gt;<br>
To: &quot;zope list user&quot; &lt;<a href="mailto:zope@zope.org" target="_blank">zope@zope.org</a>&gt;<br>
Sent: Monday, July 07, 2008 3:42 PM<br>
Subject: [Zope] ZCatalog : Searching Multiple Indexes : Returning One Result<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, I have a catalog called &quot;catalog&quot; that contains a bunch of cataloged<br>
items. I have indexed 3 properties for each item, &quot;name&quot;, &quot;body&quot; and<br>
&quot;description&quot;. I&#39;d like to be able to search the catalog in the following<br>
way:<br>
<br>
if the word &quot;text&quot; shows up in any index, &quot;name&quot;, &quot;body&quot; or &quot;description&quot;,<br>
return that result back once.<br>
<br>
The problem is I have is that if a do a search for &quot;text&quot; and say there&#39;s<br>
results that have the word &quot;text&quot; in one or more of those indexes:<br>
<br>
catalog({name:query}) or catalog({body:query}) or<br>
catalog({description:query})<br>
only gives back limited results (leaves out some &#39;True&#39; hits) and:<br>
catalog({name:query}) + catalog({body:query}) + catalog({description:query})<br>
gives me back the same result 3 times.<br>
<br>
any ideas? Thanks.<br>
</blockquote>
<br></div></div>
Something I saved from a long time ago post (warning untested) which may give you some ideas:<br>
<br>
&lt;snip&gt;<br>
context.Catalog({&#39;keywordindex&#39;: [&#39;Value1&#39;, &#39;Value2&#39;]})<br>
Catalog returns me an OR search instead of an AND one<br>
<br>
Use &quot;context.Catalog(keywordindex = {&#39;query&#39;:[...], operator=&#39;and&#39;})&quot;<br>
when you want to use the &quot;and&quot; operator.<br>
&lt;/snip&gt;<br>
<br>
hth<br><font color="#888888">
<br>
Jonathan<br>
<br>
</font></blockquote></div><br>