please have a look at AttributeIndex mixin.&nbsp;<div><br></div><div><a href="http://apidoc.zope.org/++apidoc++/Book/indexcatalog/catalog/show.html">http://apidoc.zope.org/++apidoc++/Book/indexcatalog/catalog/show.html</a>&nbsp;</div>
<div><br></div><div>Having 3 different Attribute Indices might be a better idea than 3 different Text Indices.&nbsp;</div><div><br></div><div><br></div><div>With regards,</div><div>- Shailesh</div><div>&nbsp;<br><br><div class="gmail_quote">
On Fri, Feb 13, 2009 at 10:33 PM, Massimiliano della Rovere <span dir="ltr">&lt;<a href="mailto:massimiliano.dellarovere@gmail.com">massimiliano.dellarovere@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Suppose I have an object with the following interface:<br>
IArtFile<br>
author: TextLine...<br>
subject: Textline...<br>
location: TextLine...<br>
<br>
I setup 3 text indices and create 3 adapters implementing<br>
ISearchableText to extract each field.<br>
<br>
I want &nbsp;to create a search viewlet or page with a &lt;form&gt; section containing<br>
[search field author, name &amp; id = author]<br>
[search field subject, name &amp; id = subject]<br>
[search field TextLine, name &amp; id = subect]<br>
I thought about using a class derived from BaseForm or something like<br>
that to use the practical Fields(IArtFile). What is the best class to<br>
derive from?<br>
<br>
Then I have somehow to instruct the ICatalog Utility to combine the<br>
result from the indicies, I mean<br>
if subject is &quot;David&quot; and author &quot;Michelangelo&quot; and location<br>
&quot;Firenze&quot;, I want all the istances implementing IArtFile having these<br>
text lines in their attributes.<br>
I was thinking about converting the list returned by each<br>
catalog.apply function into set and then calculating the intersect<br>
function.<br>
Is there a better way to do it?<br>
_______________________________________________<br>
Zope3-users mailing list<br>
<a href="mailto:Zope3-users@zope.org">Zope3-users@zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/zope3-users" target="_blank">http://mail.zope.org/mailman/listinfo/zope3-users</a><br>
</blockquote></div><br></div>