Since 3.0.0 UdmSearch can index SQL database text fields -
so called  HTDB virtual URL scheme.

Please note that currently UdmSearch may index only those 
tables that  are in the same database with UdmSearch tables. 
MySQL users may specify database in the query though. 
Also you must have PRIMARY key on the table you want to index.

Take a look at sample of indexer.conf in doc/samples/htdb.conf

Two indexer.conf commands provide HTDB. 
There are HTDBList and HTDBDoc. 

HTDBList is SQL query to generate list of all URLs which correspond
records in the table using PRIMARY key field. For example:

HTDBList SELECT concat('message.php?id=',id) FROM bar.messages


HTDBDoc is query to get the only concrete record from database 
using PRIMARY key value.

Note that HTDBDoc query must return FULL HTTP response with headers. 
So, you can build very flexible indexing system giving different HTTP 
status in query. Take a look at HTTP-codes.txt of documentation to understand
indexer behavor when it get different HTTP status.


You may use PATH parts of URL as parameters of both HTDBList and HTDBDoc 
SQL queries. All parts are to be used as $1, $2,  ... $n, where number
is the number of PATH part:

htdb:/part1/part2/part3/part4/part5
       $1    $2    $3    $4    $5

In doc/samples/htdb.conf sample the only one path part is used.

You may use long URLs to provide several parameters to both HTDBList 
and HTDBDoc queries. For example, htdb://path1/path2/path3/path4/id with
the query:

HTDBList SELECT id FROM table WHERE field1='$1' AND field2='$2' and field3='$3'

This query will generate such URLs:

htdb://path1/path2/path3/path4/id1
...
htdb://path1/path2/path3/path4/idN

for all values of the field "id" which are in the HTDBList output.


If there is no result of HTDBDoc or query does return several records,
HTDB retrival system generates "HTTP 404 Not Found". It usually may
happen at reindex time if record was deleted from your table since last
reindexing. You may use "DeleteBad yes" to delete such records from 
UdmSearch tables as well.


You may use several HTDBDoc/List commands in one indexer.conf with
corresponding Server commands.


At the end of doc/samples/htdb.conf we wrote:

Server  http://mysearch.udm.net/
Alias   http://mysearch.udm.net/message.php?id= htdb:/
Alias   http://mysearch.udm.net/                htdb:/


It means that "http://mysearch.udm.net/message.php?id=xxx" URLs will be
shown in search result, but "htdb:/xxx" URL will be indexed instead,
where xxx
is PRIMARY key value, the ID of record in "messages" table.


