[Zope] searching a ZCatalog
Chris Muldrow
muldrow@mac.com
Fri, 03 Jan 2003 16:31:45 -0500
You'll probably want to pass the search terms on by putting them into a
hidden form variable or attaching them to the links you're building on your
results, like so: http://yoursite.com/objectfound?yoursearchterms=<dtml-var
yoursearchterms>
And you'll need some sort of document filter method to process your document
and do a string match against your search terms--maybe a Python script that
takes your document source and your search terms (as a list) as arguments
and does something like this:
for term in searchterms:
document_source.replace(term, "<b>"+term+"</b>
return document_source
So your link will actually look like this:
http://yoursite.com/objectfound/pythonobjectprocessor?yoursearchterms=<dtml-
var yoursearchterms>
On 1/3/03 4:11 PM, "catonano@tiscali.it" <catonano@tiscali.it> wrote:
> Hello list, Happy New Year!
>
> Sorry if I already posted this msg, but I didn't see it so I think that
> was another malfunctioning of my mailer.
>
> I gave a ZCatalog and I perform searches on the PrincipiaSearchSource field.
> I modified the results table so that it shows links to the found occurrences,
> not just blackon white results
>
> Now what I'd like that when I click on one of those links, the file that
> opens has the occurrences highlighted somehow, say:
>
>
> blah bla blah occurrence blah bla blah
>
>
> Anyone would suggest me how?
> Thak you so much
> Bye
> Catonano
>
>
>
> __________________________________________________________________
> Tiscali ADSL: abbonati entro il 31 gennaio.
> Non paghi l'attivazione.
> Non paghi il primo mese.
> http://www.tiscali.it/adsl
>
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>