Configuring htdig to produce xml

htdig uses a few configuration files. An example configuration is included in this package, It can be found in config/htdig/config. The first interesting file is called htdig.conf , in this file you can configure the url of your site and the location of the search database files. The second interesting file has to do with making htdig output xml. edit xml.conf and point template_dir to config/htdig/config/templates using a full path name.

Indexing your website

./rundig can be used to index you database this script is provided by htdig but also present in this package, you need to start in with the right configuration (./rundig -c htdig.conf). On a clean mmbase 1.7 install this takes a few minutes (you didn't forget to start your website first did you?).

Testing if the indexing worked

htsearch -c xml.conf keywords=mmapps now should return something like this

Content-type: text/html

<?xml version="1.0"?>
     <title>XML Importer installation guide</title>
     <excerpt>&lt;strong&gt;&lt;code&gt;... &lt;/code&gt;&lt;/strong&gt; the XML-importer homepage on the MMBase website. * Update the contents of mmbase/applications/xmlimporter from cvs. * Update the contents of html/&lt;strong&gt;mmapps&lt;/strong&gt;/xmlimporter from cvs. * Update the file config/default/dtd/transactions.dtd from cvs. * Edit transactionhandler.xml in your MMBase modules config directory&lt;strong&gt;&lt;code&gt; ...&lt;/code&gt;&lt;/strong&gt;</excerpt>


Configuring htdig bean

The HTDigBean is configured the statnard way mmbase utils are configured in config/utils/htdigbean.xml. to test if it works copy htdigsearch.jar to our WEB-INF/lib dir, copy search.jsp to the root of you webserver, copy the config/utils to your mmbase config utiles directory and try it.