This file includes instructions on building UDMSearch with ODBC
support provided by the Easysoft ODBC-ODBC Bridge. This allows you to
store the UDMSearch index information in a remote ODBC datasource
e.g. run UDMSearch on your UNIX web server but store the indexed web
site information in your MS SQLServer database.

Please note that the UDMSearch project changed its name to mnoGoSearch
on 25th October 2000 and the new URL is http://search.mnogo.ru/.

The Easysoft ODBC-ODBC Bridge has been tested with UDMSearch
3.0.10pre, 3.0.10 (which includes patches submitted by Easysoft for
ODBC) and all versions up to 3.1.12. 3.0.10pre was a pre-release of
UDM in which the UDMSearch development team added the --with-easysoft
configuration option. When Easysoft tested 3.0.10pre of UDMSearch with
OOB and MS SQLServer a few problems were found which should all be
fixed by the time you read this (see Notes on 3.0.10pre below). As a
result, Easysoft only recommend running 3.0.10 and not the prerelease
version.

Configuration and Building
--------------------------

Please read the INSTALL file in the UDMSearch distribution
first. UDMSearch now has a configure option (--with-easysoft) which
may be used to specify that UDMSearch should use OOB for ODBC
support. If you would like to use multiple ODBC drivers with UDMSearch
then it would be best to build UDMSearch with unixODBC
(--with-unixODBC) and then add OOB as an ODBC driver to unixODBC.

Follow the UDMSearch INSTALL file using --with-easysoft or
--with-unixODBC on the configure line. Once built correctly and
installed you need to follow the instructions in UDMSearch's doc
directory to configure the indexer and search.cgi scripts.

Once this is complete you must ensure you create the UDMSearch tables
in your database. UDMSearch contains subdirectories under create in
the distribution tree for each database engine. For example,
create/mssql/create.sql contains the text to create the UDMSearch
tables for MS SQLServer (see the UDMSearch documentation). You have
two alternatives:

[1] Copy this file to your database machine and run it through your
    database engine.

[2] Define your OOB DSN (below) and then create the tables in your
    database remotely through OOB. You can use command line utilities like
    isql, that comes with unixODBC, to achieve this or write a simple
    piece of C code which does an SQLExecDirect on each of the SQL statements
    (in this case delete the comments and GO commands).

Now create a DSN that OOB and optionally unixODBC can see.

If you built UDMSearch with unixODBC then run unixODBC's ODBCConfig
program and create an OOB client DSN which points to a machine where
you have installed the OOB Server, where your database is located and
name the TargetDSN. If you did not build unixODBC with the GUI options
you will have to edit your ~/.odbc.ini or system odbc.ini file manually
to add the OOB DSN.

If you built UDMSearch with OOB directly then you must create a DSN in
any of the places OOB looks for DSNs (these include the ODBCINI
environment variable, ./odbc.ini, ./.odbc.ini, ~/odbc.ini,
~/.odbc.ini, /etc/odbc/ini, consult the OOB documentation or FAQ).

In either case the DSN you create will look like this:

[dsn_name]
Description = UDMSearch
Driver = OOB
Server = machine_where_oob_server_installed (e.g demo.easysoft.com)
Port = 8888
Transport = tcpip
TargetDSN = system_dsn_on_Server_machine
LogonUser = server_OS_username
LogonAuth = server_OS_password
TargetUser = username	(optional)
TargetAuth = password	(optional)

See the OOB documentation for what each attribute means.

Once the DSN is defined and you have edited your indexer.conf file you
should be able to run the UDMSearch indexer command which will write
records about the web/ftp sites you have defined to the database.

Do not forget to make sure the defined DSN is also available to your
web server otherwise when you run the UDMSearch search.cgi program to
search the indexed pages it will fail to connect to your ODBC
database.

Notes on 3.0.10pre
------------------

If you are thinking about using UDMSearch 3.0.10pre with OOB and MS
SQLServer Easysoft recommend looking for a more recent version. 3.0.10pre
(which is the first version we tested but it is noted this is a pre-release)
contains a few problems affecting its use with OOB and MS SQLServer. These
are outlined below:

[1] The create.sql file in create/mssql defines the lang column of the
    url table as being NOT NULL. This should be changed to NULL.

[2] There is no easy way in UNIX to get the SQL in create.sql in to MS
    SQLServer. You can copy the create.sql to the machine where MS
    SQLServer is located and and do it there. Otherwise you need to
    write a small ODBC program (or borrow the isql one from unixODBC)
    which calls SQLExecDirect for each statement in create.sql.

[3] The quoting rules used by MS SQLServer are used by UDMSearch.
    Specifically, the single quote character (') is escaped by prefixing
    with  backslash (\) instead of using two single quotes (''). This may
    be temporarily fixed by editing sql.c and making the following change:

    In function escstr for non-MYSQL and Oracle databases change the 
    action of the '\'' and '\\' cases from:

    *x='\\';x++;

    to

    *x='\'';x++;

    The proper fix for this would be to add a new DBType indexer configuration
    for MSSQL and this has been done in later versions.

    Without this change you may see syntax errors when running
    UDMSearch's indexer through OOB to MS SQLServer.

