|
Configuring
a Database for Vocabulary-Assisted Searching with its Thesaurus Database
Introduction
This topic is a step-by-step
procedure that explains how to configure a database to use an associated
thesaurus database to facilitate vocabulary-assisted
searching. See
Scenario 1 and Scenario 2 in both Vocabulary-Assisted
Searching Process Flow and Vocabulary-Assisted
Searching in the WebZ Out-of-the-Box Interface for detailed information
about the process flow and screens involved in this activity, respectively.
Thesaurus databases
are designed to work with a particular database and a database can be
associated with only one thesaurus. Each thesaurus database contains a
controlled vocabulary specific to the database it supports. For example,
the thesaurus database for ERIC includes terms applicable to education,
the thesaurus database for PsycFirst contains terms relevant to psychology,
and so on.
If a thesaurus database
supports component postings (the number of database "hits" available for
a term shown in the thesaurus tree), it is possible to display a postings
count for each item in the tree.
You must obtain the
appropriate license for each thesaurus you plan to use. For thesaurus
databases other than those demonstrated with the WebZ Out-of-the-Box Interface
(OBI), version 1 (PsycThesaurus, ERICThesaurus, LCSH, and MeSH),
contact Open SiteSearch Support for assistance
before you attempt this procedure.
Note: |
Throughout this
procedure, <WebZ_root> refers to the location of your
SiteSearch environment. |
Procedure
Summary
This procedure includes
the following activities:
- Adding the thesaurus
database to the WebZ system
- Editing the database's
configuration file to link it to its thesaurus database
- Adding the thesaurus
database to the accessdb database and associating it with the proper
user id's (if using the Access component)
- Ensuring that vocabulary-assisted
searching is enabled in your interface style files
- Ensuring that your
interface style files contain references to the appropriate gadgets,
images, and HTML pages for vocabulary-assisted searching
- Ensuring that your
interface display gadgets configuration files contain gadgets for displaying
term lists and thesaurus trees
- Editing formatting
configuration files for displaying term lists or thesaurus tree displays,
as needed
Procedure
Steps
1. Add
the thesaurus database to the WebZ system by following the procedure
outlined in the topic, Configuring Access
to Databases and Servers, with the following exceptions and
special notes.
- When creating
the thesaurus database's configuration file, note the following:
|
Section |
Notes |
|
[database]
|
Ensure
that Set HideInMenus = TRUE.
This
prevents the thesaurus from appearing in the database list
presented to patrons (<WebZ_root>/htdocs/obiv1/html/dblist.html
in the OBI).
|
|
[formats] |
Add references
to the formatting configuration files for the term list (termlist),
thesaurus tree (thestree), and optionally, for dumping records
from the thesaurus database.
To start,
review the formatting configuration files in the OBI for PsycInfo,
ERIC, Library of Congress Subject headings, and Medical Subject
Headings in <WebZ_root>/ini/dbs/: PsycThesaurusFormats.ini,
ERICThesaurusFormats.ini, LCSHFormats.ini, and MeSHFormats.ini,
respectively.
It may
possible to copy one of these files under a new name and use
it with successfully with only minor modifications to the
field specifications.
|
|
[TermFinder] |
Use only
the lines shown below:
[TermFinder] TermFinderSearchIndex = indexname UseAdjacencyInTFSearch = true OR false
where:
- TermFinderSearchIndex
is the name of the index to use to conduct a term finder
search of the thesaurus from the Term Finder screen. This
must be an index defined in the thesaurus's database configuration
file, and is often the Main Term index.
- UseAdjacencyInTFSearch
is a flag that indicates that the term finder search should
be an adjacency search of the TermFinderSearch index. Set
this flag to true if the TermFinderSearchIndex is a "words-type"
search and the remote server does not support "with" syntax
in searches.
|
|
[index] |
A thesaurus
database must have at least two indexes: Main Term and Exact
Main Term (see examples in <WebZ_root>/ini/dbs/PsycThesaurus.ini,
ERICThesaurus.ini, LCSH.ini and MeSH.ini). |
- Do not
add the thesaurus database to topic areas or Quick Search Topics
(step 5 in Configuring Access to Databases
and Servers).
|
2. Edit
the database configuration file to associate it with the thesaurus
database and configure it for vocabulary-assisted searching:
- Add a reference
to the database's thesaurus in the [database] section:
ThesaurusDbName = name of thesaurus database
where name
of thesaurus database is equal to the dbName variable in the
[database] section of the
thesaurus's database configuration file.
- If the database
supports component postings (the ability to obtain a count of
the number of records that satisfy a search), add this line to
the [database] section:
Component Postings = true
- Add a new
section to the file, as follows, to specify parameters for building
the term list from the database:
[TermFinder]
TermListSearchIndex = indexname
SampleSize = n
TermFinderSearchIndex = indexname
UseAdjacencyInTFSearch = true OR false
where:
- TermFinderSearchIndex
is the name of the index to use to conduct a term
finder search of the thesaurus from the Term Finder screen.
This must be an index
defined in the database configuration file.
- SampleSize
is the number of records to retrieve from the database to create
a term list when the term list is generated from a term finder
search of the database rather than its thesaurus database. The
default is 15.
- TermFinderSearchIndex
is the name of the index to use to conduct a term finder search
of the database from the Term Finder screen. This must be an index
defined in the database configuration file.
- UseAdjacencyInTFSearch
is a flag that indicates that the term finder search should be
an adjacency search of the TermFinderSearch index. Set this flag
to true if the TermFinderSearchIndex is a "words-type" search
and the remote server does not support "with" syntax in searches.
- Add a line
in the [formats] section for the formatting configuration file
that contains a display specification for formatting the term
list when it comes from the database. The example below references
FSMarcRTLFormat.ini, which can probably be used with minor modifications
for most FirstSearch databases:
termlist = format/obiv1/FSMarcRTLFormat.ini
Another formatting
configuration file that works well for many other citation and
catalog-type databases is <WebZ_root>/format/obiv1/MarcRTLFormat.ini.
See Term List
Formatting Configuration Files for more information.
|
3. If
the site uses WebZ's Access component to manage patron access to
the system, add the thesaurus database to the dbs and userdb tables
in the Access database (<WebZ_root>/msqldb/accessdb).
|
4. Check
your interface style files to make sure that the search screen (<WebZ_root>/htdocs/obiv1/html/search.html
in the WebZ Out-of-the-Box Interface (OBI), version 1) allows patrons
to access the Term Finder screen.
For example,
if you use the SearchTabbar gadget (ORG.oclc.gadgets.SearchTabbar)
to add tabs to the search screen, add the following line to the
[TabBar] section of the interface style file:
termfinder = database
|
5. Ensure that
your interface style files contain references to the gadgets, images,
and HTML pages you are using to display the term
finder, term list,
and thesaurus tree
screens. Click here
for more information. |
6. Ensure
that the interface display gadgets formatting file(s) used (<WebZ_root>/ini/interface/obiv1/frameDisplayGadgets.ini
and noframeDisplayGadgets.ini in the OBI, version 1) contain
references to the display gadgets used for the term
list and thesaurus
tree screens.
In the OBI,
version 1, these gadgets are ORG.oclc.gadgets.TermListDisplay
and ORG.oclc.gadgets.ThesTreeDisplay,
respectively, and their sections in the interface display gadgets
files are as follows:
[TermListDisplay] gadget = ORG.oclc.gadgets.TermListDisplay fmt = termlist dataWrapper = termlistHtml tempdb = true
[ThesTreeDisplay] gadget = ORG.oclc.gadgets.ThesTreeDisplay fmt = thestree tempdb = true
The dataWrapper
specification for the [termlistHtml] section referenced in [TermListDisplay]
is:
[termListHtml]
sectionheader <tr><td colspan="3" valign="middle" align="left">\n
sectiontrailer = </td></tr>\n
rowstart = <tr>\n<td valign="middle"align="left"> \
&StyleTable.fonts.smallRecordText;
betweenrows = </font></td>\n</tr>\n<tr>\n \ <td colspan="2" align="left"> </td>\n<td>
betweencolumns = </td>\n<td align="left"> \ &StyleTable.fonts.defaultRecordText;
rowend = </td>\n</tr>\n
lineBreak = \n<br>
ThesaurusUsedForBeforeLabel = <table>\n<tr>\n<td valign="top"> \
\n&StyleTable.fonts.smallRecordText;<i>
ThesaurusUsedForAfterLabel = : </i></td>\n<td> \ &StyleTable.fonts.smallRecordText;
ThesaurusUsedForSeparator = ;
ThesaurusUsedForTrailer = </font></td>\n</tr>\n</table>/n
And the dataWrapper
specification for the [ThesTreeDisplay] section ([thestree]) is:
[thesaurusHtml]
ThesaurusUsedForBeforeLabel = <tr><td> </td>\n<td valign="top"> \
\n&StyleTable.fonts.smallRecordText
;<i>
ThesaurusUsedForAfterLabel = : </i>&StyleTable.fonts.smallRecordText;
ThesaurusUsedForSeparator = ;
ThesaurusUsedForTrailer = </font></td>\n</tr></tr>\n</table>/n
For more information
about the role of interface display gadget files in formatting,
see Display
Formatting Configuration Files.
|
7. Modify
the formatting configuration files for displaying
a term list from the database, displaying
a term list from the database's thesaurus, and displaying
a thesaurus tree, as needed.
You should
generally only have to modify the field specifications so that they
refer to the correct fields and/or subfields.
See Term
List Formatting Configuration Files and Thesaurus
Formatting Configuration Files for information about these files
and Formatting
Specifications for more general information about WebZ's
rules-based formatting.
|
See Also
Database
Configuration Files
databases.ini Configuration File
Interface
Style Configuration Files - Sections and Variables
WebZ and Vocabulary-Assisted Searching
Vocabulary-Assisted Searching Process Flow
|