Re: [htdig] Non-blocking updates?


Geoff Hutchison (ghutchis@wso.williams.edu)
Thu, 08 Jul 1999 08:27:32 -0400


David Robley wrote:
> # Copy the current databases to .work
> cp $DBDIR"db.docdb" $DBDIR"db.docdb.work"
> cp $DBDIR"db.docs" $DBDIR"db.docs.work"
> cp $DBDIR"db.docs.index" $DBDIR"db.docsindex.work"

There's a typo there... "db.docs.index.work"

> cp $DBDIR"db.wordlist" $DBDIR"db.wordlist.work"
> cp $DBDIR"db.words.db" $DBDIR"db.words.db.work"
..
> mv $DBDIR"db.docdb.work" $DBDIR"db.docdb"
> mv $DBDIR"db.docs.work" $DBDIR"db.docs"
> mv $DBDIR"db.docs.index.work" $DBDIR"db.docs.index"
> mv $DBDIR"db.wordlist.work" $DBDIR"db.wordlist"
> mv $DBDIR"db.words.db.work" $DBDIR"db.words.db"

Mine does a bit less copying--you don't need to do all that.

 * db.words.db and db.docs.index are generated by htmerge--not needed in
.work format
  (i.e. You don't have to copy these since they'll just be overwritten
and will take up space.)
 * db.wordlist is never needed by the searching process, but speeds up
indexing
  (i.e. Leave it in the .work form if you're using -a or it will just
take up space.)
 * db.docs is generated from -t and like db.words.db and db.docs.index,
it will just be overwritten
  (i.e. If you want the file, cool, but don't bother copying it to .work
since it will just take up space.)

So mine tries to be much smarter about moving things around. It leaves
the db.wordlist.work from the last run (since it's not needed in the
non-work version). It leaves a copy of the old db.docdb.work file so the
next dig will go faster. Alternatively, you could copy this beforehand
and move it into place, but since you'll need the duplicate disk space
when indexing anyway, I figured I'd "mark it out."

Make sense?

-- 
-Geoff Hutchison
Williams Students Online
http://wso.williams.edu/
------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Thu Jul 08 1999 - 04:44:26 PDT