Re: htdig: Updating and merging


Geoff Hutchison (ghutchis@wso.williams.edu)
Tue, 15 Dec 1998 16:01:34 -0500 (EST)


> #! /bin/sh
> /home/httpd/htdig/bin/htdig -v -a -s -t
> /home/httpd/htdig/bin/htmerge -v -a -s
> mv /home/httpd/htdig/db/db.wordlist.work \
> /home/httpd/htdig/db/db.wordlist
> mv /home/httpd/htdig/db/db.words.db.work \
> /home/httpd/htdig/db/db.words.db
> mv /home/httpd/htdig/db/db.docs.index.work \
> /home/httpd/htdig/db/db.docs.index
> mv /home/httpd/htdig/db/db.docdb.work \
> /home/httpd/htdig/db/db.docdb

> The result is to do a completely new dig and merge within the '.work' files
> and then use them to overwrite the old database. My impression from the
> documentation is that there is a better way to do updates. Any suggestions
> on how to use my work files?

No, this is about right.

I'm guessing that I should just include my rundig script into the next
release. :-)

This would be what my version of your script looks like:
/opt/htdig/bin/htdig -a -s
/opt/htdig/bin/htmerge -a -s
cp $DB_DIR/db.docs.db.work $DB_DIR/db.docs.db
mv $DB_DIR/db.docs.index.work $DB_DIR/db.docs.index
mv $DB_DIR/db.words.db.work $DB_DIR/db.words.db

The db.wordlist file is only necessary if you're doing updates. Since I
use -a too, I just keep it as a .work file. The other three files are
needed without the .work to be used by htsearch. But since I don't want to
lose the db.docs.db.work file, which is also needed for updates, I'll copy
that and move the rest.

-Geoff Hutchison
Williams Students Online
http://wso.williams.edu/

----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-request@sdsu.edu containing the single word "unsubscribe" in
the body of the message.



This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:29:52 PST