[Zope-CMF] Modifying SearchableText...? How...?

Stoons - [ HeadNet ] stoons@headnet.dk
Tue, 24 Sep 2002 02:09:04 +0200


A Solution for "Modifying SearchableText"

I added a new script to "custom" called "seekText" :
= = = = = = = = = = = = = = = = = =
result=""

for a in range(len(context.propertyValues())):
    result="%s %s " % (result,str(context.propertyValues()[a]))
return "%s" % result

= = = = = = = = = = = = = = = = = =


I added a new textIndex called "seekText" to the portal_catalog
I reindexed portal_catalog...

The Result:

When I then click on one of the objects in the catalog
(http://localhost:8080/CMF/portal_catalog/manage_objectInformation?rid=xxxx)
it showes seekText like a dream ("Yipiii , it works", was what I was
thinking)
but: When I search the content of "seekText" on the site it returns: None...
("Doh!")

It turns out that I have to rewrite "search" or maybe "doFormSearch" ...
then it will be working! ("hrrmmpphhh...! Work-work-work")

I have already tested it, and it "works" when "search" looks like this:
= = = = = = = = = = = = = = = = = =
<dtml-var standard_html_header>

<dtml-in "portal_catalog(seekText=REQUEST['SearchableText'])">
<dtml-if Title><dtml-var Title></dtml-if><br>
<dtml-if Description><dtml-var Description></dtml-if><br>
</dtml-in>

<dtml-var standard_html_footer>
= = = = = = = = = = = = = = = = = =

/Stoons