[ZDP] The search code.
jiva@devware.com
jiva@devware.com
Thu, 25 May 2000 16:06:00 -0700
Perfect! Now, one more question, then I'll shut up. If I wanted to
put an external method on this server, how do you suggest I do it? I
didn't see PythonMethods installed anyplace. Basically, I wanna do
something like this:
def SnipFirst80(self, sContent):
return(sContent[:80])
On Fri, May 26, 2000 at 12:58:58AM +0200, Maik Roeder wrote:
> 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
>
--
Never call a man a fool. Borrow from him.