Re: [Zope-dev] ZCatalog: Forgot to mention
Tom,
Michel can correct me if I'm wrong here, but I believe only properties get indexed in the Catalog. YOu can also only retuen properties as meta_data. If you want the value of a given method that comes up fora Catalog result, you do this:
<dtml-in "Catalog.searchResults(title='foo')"> <dtml-with "resolve_url(getpath(data_record_id_),REQUEST)"> <dtml-var getParentEx> </dtml-with> </dtml-in>
This will return the value of getParentEx method for the record returned.
You can catalog mthod results as well. But as catalog won't pass in any parameters, you cannot use DTML Methods or Documents. Use an External Method or Python Method instead. [RH>Hm, I didn't know about this feature either (is this documented somewhere, if not, I'll try and document it when i understand it ;-)), so I was experimenting a little. Using a DTML Document/method did work. However, I did not get to the point of getting it working for a method other than with a simple text content (like '1 2 3'). This the Catalog did return. I did not yet figure out how to query it. A standard search method did not return any results. However, the report from the search interface called on its own (without using the search form from the search interface) actually _did_ return all results. Could someone help me to understand this further? Michel? By the way, wasn't it also possible to index sql methods (if called as records through the web?) Rik
From: "Rik Hoekstra" <rik.hoekstra@inghist.nl>
You can catalog mthod results as well. But as catalog won't pass in any parameters, you cannot use DTML Methods or Documents. Use an External Method or Python Method instead.
[RH>Hm, I didn't know about this feature either (is this documented somewhere, if not, I'll try and document it when i understand it ;-)), so I was experimenting a little. Using a DTML Document/method did work. However, I did not get to the point of getting it working for a method other than with a simple text content (like '1 2 3'). This the Catalog did return. I did not yet figure out how to query it. A standard search method did not return any results. However, the report from the search interface called on its own (without using the search form from the search interface) actually _did_ return all results. Could someone help me to understand this further? Michel?
By the way, wasn't it also possible to index sql methods (if called as records through the web?)
I don't know about SQL Methods. Your DTML Method worked, because it didn't try to access anything in the namespace. As your method doesn't get called with the client and namespace arguments, you cannot access anything outside the method itself. Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server ---------------------------------------------
Martijn Pieters wrote:
From: "Rik Hoekstra" <rik.hoekstra@inghist.nl>
You can catalog mthod results as well. But as catalog won't pass in any parameters, you cannot use DTML Methods or Documents. Use an External Method or Python Method instead.
I don't know about SQL Methods.
Your DTML Method worked, because it didn't try to access anything in the namespace. As your method doesn't get called with the client and namespace arguments, you cannot access anything outside the method itself.
But you can with Python/External Methods? With or without parameters? Where then lies the difference, and why? Is it because of DTML evaluation? I do not understand this. Rik
participants (2)
-
Martijn Pieters -
Rik Hoekstra