Re: [htdig] Variable in resume templates


Subject: Re: [htdig] Variable in resume templates
From: Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Date: Tue Nov 07 2000 - 13:53:28 PST


According to Marc Duch:
> Hello,
> I have a question about the variables for the resum templates.
> I need a variable, which gives me the number of all documents crawled.
> For Example i want to create a wrapper.html, that begins with
>
> "144 Matches of 2850 documents"

It would be a neat feature, but unfortunately adding it would slow
things down somewhat, as far as I can tell. The count of the number
of documents in the database is not maintained within one record in the
database, so the only way to obtain the count would be to traverse the
db.docdb database and count records. I'd be glad to be proven wrong on
this point, but from what I've seen in the code, I don't think there's
a quicker way.

I suppose a quick and dirty way of implementing it would be to save
the document count from htmerge -s in a file, and in your htsearch
configuration you could do something like:

allow_in_form: total_document_count
total_document_count: `/path/to/saved/count`

to define the template variable $(TOTAL_DOCUMENT_COUNT) for your wrapper
template.

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------ To unsubscribe from the htdig mailing list, send a message to htdig-unsubscribe@htdig.org You will receive a message to confirm this. List archives: <http://www.htdig.org/mail/menu.html> FAQ: <http://www.htdig.org/FAQ.html>



This archive was generated by hypermail 2b28 : Tue Nov 07 2000 - 14:00:28 PST