Htdig is used to provide the search engine on sourceware and gcc.gnu.org. It is a highly configurable program written in C/C++.
htdig is set up on sourceware with two entirely separate configurations/databases -- one for gcc.gnu.org and one for sourceware.cygnus.com. Hans-Peter Nilsson (hp@bitrange.com) has shown exceptional interest and knowledge in htdig, and maintains the search engine for the GCC project.
To leech off of H-P's contribution, as much as possible the htdig configuration files are shared (infra/htdig-conf/site.conf) and the parts that are specific to each site are in separate files in that same directory.
The configuration files are under CVS in the sourceware repo, but everything else htdig-related is in /sourceware/htdig. This is all on its own partition, and a large one at that. Everything is owned by userid htdigid.
htdig, in the process of rebuilding its database, needs about 3x the total size of the database. And its database is quite large. An example: If your database is 1GB, you'll need another 2GB to update the database.
Why 3x? The htupdate script does the rebuilding; it first makes a copy of the database files so that people can still search against the old database while the new database is being built. The original database plus the copy mean you've used 2x disk space. Another 1x is used to sort all of the entries after htupdate has finished checking all the web site.
Sometimes the htdig databases need to be regenerated. Reasons vary from (mythical) system crashes during the normal update, or when mailing list archives move. How?
With ample disk space, I've seen htdig work without problems for months. With tight disk space, problems happen all the time. When I configured the sourceware system in summer 1999, I tried to make the htdig partition big enough for about two years of database growth.
To rebuild htdig, I used this configure line for htdig 3.1.5:
% ./configure \ --prefix=/sourceware/htdig/sourceware \ --with-cgi-bin-dir=/sourceware/htdig/sourceware \ --with-image-dir=/sourceware/htdig/sourceware/images \ --with-search-dir=/sourceware/htdig/sourceware/search-samples
The 'htsearch' binary that you end up with after doing the make all install needs to be checked in to the cgi-bin directory of the sourceware.
See also the other htdig page.
Last modified 2000-12-27 by hp@bitrange.com.