[Zope] How do I efficiently join catalog results with other data?

Casey Duncan cduncan@kaivo.com
Fri, 27 Jul 2001 15:13:55 -0600


"Jay, Dylan" wrote:
> 
> Here is my problem:
> 
> I have a dynamic per user map of data about various objects. I want to do a
> catalog search, combine the results with my other dynamic data and then sort
> on the dynamic data.

What type of "dynamic data"? Integers, dates, strings, etc?

> 
> Has anyone tried doing this?
>  How do I do it efficiently, still getting the benifits of low memory usage
> of lazy result sets?

You should make the dynamic data returned from a script and add a field
index to the catalog that calls the script. Then you can use the
"sort_on" argument to the catalog to sort on the dynamic data.

This won't work though if the dynamic data changes often for a given
object though...

> Can I do this transparently so the results of the join look like a normal
> catalog results?

The above would accomplish this.

> Can I do this using only through the web scripts?
> 

You can catalog against Python scripts that are called through
acquisition.

hth,
-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>