The following code receives a path to a Estraier DB and a file and adds it to the DB:

(use estraier)(define(estraier-update-document path-db path-text)(let((doc (est-doc-new))); Here you could use an HTTP URL if your file is visible somewhere:
(est-doc-add-attr doc "@uri" path-text); You will want to set the title to something more meaningful:
(est-doc-add-attr doc "@title" path-text)(with-input-from-file path-text
(lambda()(letloop((line (read-line)))(unless (eof-object? line); If your file is not in Unicode, use the iconv egg to convert
; the charset of the lines to Unicode.
(est-doc-add-text doc line)(loop(read-line))))))(let((db (est-db-open path-db (bitwise-ior *estdbwriter**estdbcreat*))))(est-db-put-doc db doc *estpdclean*)(est-db-close db))))