[Zope] Objet : Re: [Zope] Searching in all field with ZCatalog

R. David Murray bitz@bitdance.com
Thu, 31 Aug 2000 14:47:12 -0400 (EDT)


> No, you asked the right question, scuse me for the error !! 
> I would like only one entry in the form to search in all indexed fields.
> I like this solution cause it is sometimes difficult for a no regulmar user in
> this aera (Protein Data Bank) to question the right field.
> In fact I would like create a simple form ;)

You can have one field, and copy the value so that it gets searched
for in all the fields when you make the catalog call.  But you don't
want to do that, because Catalog will AND the results from all
the fields.

The Advanced ZCatalog Searching HowTo shows how to OR the fields
programatically.  But what may work better for you would be to
create a method on all of your objects that returns the concatenation
of the values of all the fields of interest.  Index *that* field,
and search that field.

--RDM