[Zope] Z Search Interface returns numbers
peppetop at gmail.com
Wed Apr 11 04:37:13 EDT 2007
> > When I search something in the SearchForm (via the "test" tab)
> > I just get numbers. I mean the ReportForm correctly reports the
> > objects containing the searched string, but lists handles (I guess).
> You missed a step: you must use the Metadata tab of the ZCatalog to
> define which fields of the indexed objects should be returned with the
> results from the search. After you do that, you'll have to update the
> catalog (Advanced tab) and then regenerate your search interface.
> For instance, to return the ids of the objects, add id as a metadata.
> If you'd like to show the URL of each item, there is no need to set
> metadata for that, since the records returned form the catalog have a
> method called getUrl which gives you that. So you can use
> record/getUrl, where record is the variable name used in the
> tal:repeat statement which invokes the catalog search results.
Thanks a lot, it works!
I ended up using "getURL" metadata, because it's simplier for me.
Again thanks for your support.
More information about the Zope