[Zope] Problem : ZCatalog

Ivan Cornell ivan.cornell@framestore.co.uk
Fri, 26 Jan 2001 10:40:09 +0000


Fabien Germain wrote:

> Hello,
>
> I've got a problem with a search form.
>
> I have a ZCatalog with lots of entries. I added the index
> "absolute_url" in
> order to search by the files url.
>
> Why ?
> 'cause I have files in organized folders like that :
> ......../language_name/country_name/city_name/element
>
> I'd like to do a search on "#language_name and #country_name and
> #city_name"
> in my catalog, so I use the absolute_url.
> But the problem is that the search only looks the end of the
> absolute_url
> string, that's to say "element" in my exemple.
>
> How could I search in all the string ?

Well, my solution would be to create a python method that splits your
url up into indexable words and then index this method in ZCatalog. One
of cool features of the ZCatalog is that it can index objects methods.

Hope this helps

Ivan

PS Please send text only mail to the list -you'll probably get more
replies if you do!