[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

htsearch - a better wrapper solution



-----BEGIN PGP SIGNED MESSAGE-----


Well while coding the mod_perl wrapper I kept on thinking there's gotta
be a better (less CPU intensive) way.  I think I found it.

First read:

http://www.htdig.org/attrs.html#search_results_wrapper

Ok, there's a catch though.  (You didn't actually think it would be easy
did you?)  If you want a different wrapper file for each section and
sub-section, you need a different config file for each (sub)section.
That's because the wrapper file can only be set in the config file, not in
the form (sucks).  I'm looking into a workaround.  (Anyone a good C hack?)

But anyways, the idea is that when the script that generates the static
html files in each (sub)section, it also writes out a different config
file and wrapper.html file.  The advantage of this is *much* improved
searching performance since you don't have to call mod_perl to parse the
htsearch output, reformat it, and send it to the browser.

The good news is that the config file and wrapper.html would be extreemely
easy to do.  The config file is a simple text file, and the wrapper.html
would be based on the index.html in each (sub)section.

Jason, I know this is adding even more work to your DB->static html
script, but I think the performance increase by using this method warrents
it.

Comments?


- -- 
Aaron Turner           | Either which way, one half dozen or another. 
aturner@pobox.com      | Check out the Red Hat Linux User's FAQ Online!
www.pobox.com/~aturner | http://www.pobox.com/~aturner/RedHat-FAQ/
All emails from this account are PGP signed.  Lack of a signature is "bad".
PGP Key fingerprint = FB E1 CE ED 57 E4 AB 80  59 6E 60 BF 45 1B 20 E8



-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNvhl9jM3jpXy1kJtAQFZVgQArE2F2oBJLB7RYASF5F9n60jNHVa5oumO
wXxA3Q3jzzcbiI/xkp1jAGqSxrZdVQjNVTR+fQAIWHOYTHtkkmzMLeO54GiSFyPX
qNBN8IXebkIykKzzFE1sFT++p19SE/JyTphaglHmv48muGytHhaAcs06YnvKKLsB
4BbKVApdiyE=
=sIJC
-----END PGP SIGNATURE-----