[Zope] Text *and* field indexes in ZCatalog?

Paul Everitt Paul@digicool.com
Tue, 10 Aug 1999 08:50:49 -0400


Yep.  Define a "virtual" field that returns a concatenation of all the
real "fields" that you want indexed, then register that with the
ZCatalog as the thing that supplies the text.  The "virtual" field could
be defined up above all the XML Documents and use the magic of
acquisition to bind it to all the actual documents.

You have a number of options for defining the virtual field.  An
external method is straightforward, or an DTML Method that used the
wonderful, wonderful new <!--#return--> tag.

Alternatively, and this is where it gets truly fun, you could start
looking at giving your XML Documents a "brain".  I'm not sure if this is
ready for prime time yet though.

--Paul

> -----Original Message-----
> From: Alex.Thomas@dresdnerkb.com [mailto:Alex.Thomas@dresdnerkb.com]
> Sent: Tuesday, August 10, 1999 7:03 AM
> To: zope@zope.org
> Subject: [Zope] Text *and* field indexes in ZCatalog?
> 
> 
> On my pocket electronic organizer, I can search for a string 
> anywhere in any
> field of the address book or in some specified fields. This 
> is of course
> similar to the idea of searching through an XML document as 
> though it were a
> text stream rather than a structured source. Could ZCatalog 
> be made to work
> like this, particularly with XML-sourced data? 
> 
> cheers
> Alex
> 
> ------
> 
> ##########################################
> This email, its content and any files transmitted with it are intended
> solely for the addressee(s) and may be legally privileged and/or 
> confidential. Access by any other party is unauthorised without the
> express written permission of the sender. If you have received this 
> email in error you may not copy or use the contents, attachments or 
> information in any way. Please destroy it and contact the sender on 
> the number printed above, via the Dresdner Kleinwort Benson 
> switchboard on +44 171 623 8000 or via e-mail return. Internet 
> communications are not secure unless protected using strong 
> cryptography. This email has been prepared using information believed
> by the author to be reliable and accurate, but Dresdner Kleinwort 
> Benson makes no warranty as to accuracy or completeness. In particular
> Dresdner Kleinwort Benson does not accept responsibility for changes
> made to this email after it was sent. Any opinions expressed in this 
> document are those of the author and do not necessarily reflect the 
> opinions of the Bank or its affiliates. They may be subject to change
> without notice.
> ##########################################
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
> 
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )
>