Dual db's..

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Dual db's..

Post by Thunderstone »




I am trying to have two separate db's indexed on Webinator...
I have used always used the defaults and db for what I have been
doing. To create the second do I have to make a new directory (folder)
and point to it with the gw, or if I do something like this will do
it on its own:

gw -d/ostidb -o -D5 -unique http://www.doe.gov/mysite


david amburn
DOE/OSTI






User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Dual db's..

Post by Thunderstone »



You can create new databases with the -create option. Just supply the
database name to create:

gw -d/ostidb -create

The default search script expects databases to be under the webinator
directory. e.g.:

gw -d/usr/local/etc/htdocs/webinator/ostidb -create

You can then search the other database by giving it's name in the
initial url or search form.

http://www.yoursite.com/cgi-bin/texis/w ... ?db=ostidb

If you're using something other than the default search script, you
will probably have to change the <db=> statement near the top of
the script to specify the database or include code to allow the user
to select databases similar to that in the default search script.



User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Dual db's..

Post by Thunderstone »



My methodology for handling multiple databases is quite simple.
Within the webinator directory I maintain a subdirectory for
databases (called 'db'). The databases are stored into separate
databases from here by making gw calls like:
gw -d<path_to_webinator>/db/www -mwww.set www.infores.com
gw -d<path_to_webinator>/db/condev -mcondev.set condev.infores.com

The -m option contains specifics regarding how indexing should
work on both of these sites. See the documentation for more on
this option.

My directory structure will then look like this:
<path_to_webinator>
+---db
+---www
| :
| gw.log
| html.tbl
| :
| (and other database related files)
\---condev
:
gw.log
html.tbl
:
(and other database related files)

my search script then uses these standards to determine which
database to search (it can only be one or the other). The user
can select which database to use by changing the <select name=db>
that I added in.

Please note that, by default, gw will create a default database
called 'db' under the webinator directory, so in order to add a
new database, you may have to rethink a little.

Tim Rosine
tim.rosine@infores.com





Post Reply