[ZDP] The search code.

Maik Roeder roeder@berg.net
Fri, 26 May 2000 00:58:58 +0200


Hi jiva !

jiva@devware.com wrote:
> 
> Cool, this is exactly what I was looking for.  Now this is obviously
> iterating over this Catalog object.  What other variables does it have
> besides this getpath() method?

Quoting the ZQR at:

http://zdp.zope.org/projects/zqr/ZQR/objectreference


ZCatalog

         manage_addZCatalog(id, title, [REQUEST])
             Add a ZCatalog object 
         manage_edit(RESPONSE, URL1, [threshold=1000, REQUEST])
             edit the catalog 
         manage_catalogObject(REQUEST, RESPONSE, URL1, [urls])
             index all Zope objects that 'urls' point to 
         manage_uncatalogObject(sREQUEST, RESPONSE, URL1, [urls])
             removes Zope object 'urls' from catalog 
         manage_catalogReindex(REQUEST, RESPONSE, URL1)
             clear the catalog, then re-index everything 
         manage_catalogClear(REQUEST, RESPONSE, URL1)
             clears the whole enchelada 
         manage_catalogFoundItems(REQUEST, RESPONSE, URL2, URL1,
         [obj_metatypes, obj_ids, obj_searchterm, obj_expr, obj_mtime, obj_mspec,
         obj_roles, obj_permission])
             Find object according to search criteria and Catalog them 
         manage_addColumn(name, REQUEST, RESPONSE, URL1)
             add a column 
         manage_delColumns(names, REQUEST, RESPONSE, URL1)
             del a column 
         manage_addIndex(name, type, REQUEST, RESPONSE, URL1)
             add an index 
         manage_delIndexes(names, REQUEST, RESPONSE, URL1)
             del an index 
         catalog_object(obj, uid)
             wrapper around catalog 
         uncatalog_object(uid)
             wrapper around catalog 
         uniqueValuesFor(name)
             returns the unique values for a given FieldIndex 
         getpath(rid)
             Return the path to a cataloged object given a 'data_record_id_' 
         getobject(rid, REQUEST=None)
             Return a cataloged object given a 'data_record_id_' 
         schema
         indexes
         index_objects
         searchResults(REQUEST, used, query_map={type(regex.compile('')):
         Query.Regex,type([]): orify, type(''): Query.String, }, **kw)
             This needs to be cut down in length... Search the catalog according to the
             ZTables search interface. Search terms can be passed in the REQUEST or
             as keyword arguments. 

Best regards,

Maik Röder

-- 
Open Source is "about being able to work together with people you've
never  met, on projects that  are in  a constant state  of flux,  on 
a time schedule  that would  cause a  hummingbird's  head to  spin."
Paul Ferris, http://www.linuxplanet.com/linuxplanet/opinions/1593/1/