[Zope] ZCatalog query
jens.walte at kk.net
jens.walte at kk.net
Fri Aug 6 07:58:06 EDT 2004
Hello,
i search for a possibility to query a catalog like this:
catalog({'meta_type':myobjecttype,
[x for x in 'keyword-index' if x.find(mysubstring) != -1]})
Description:
there is a metadata (keyword index) for urls in my catalog
and i have to know the catalogentries with a matching substring in this keyword-index
Example:
catalog-entry1 -> ['/abc/def/123', '/ghi/123']
catalog-entry2 -> ['/ghi/123', '/abc']
catalog-entry3 -> ['/xyz/def/123', '/ghi/123']
and i search with '/abc' and wanna get entry1 and entry2
a simple iteration over all results (only filtered by meta_type) is much too slow!
regards
jens walte
More information about the Zope
mailing list