![]() |
|
![]() |
|
Tutorials |
Omnidex Text |
1 - Open and Change the Environment Source File 2 - Compile the Environment File and Reinstall the Indexes
|
Automatically Use a Synonym ListIn this lesson, we will modify an Omnidex environment file to force queries against the contact name column to always include synonyms of the name in the criteria. This is accomplished by adding a synonyms option to the column definition.
Step 1 - Open the Environment Source FileWe will use the orders sample database for this example. The source file can be opened and edited with any text editor. Open the file and locate the Customers table, then locate the Contact column. Change the column definition, as follows: COLUMN "CONTACT" PHYSICAL "CONTACT" DATATYPE
C STRING(24) This example instructs Omnidex as to which synonym list to use when a
synonym search is performed. The AUTOENABLE option causes a synonym search
to always be performed when criteria is applied to this column. Save the changes.
Step 2 - Recompile the Source File and Reinstall the IndexesFor the changes to take effect, you must recompile the source file and reinstall the indexes. > oacomp orders ... > dbinstal < orders.in ...
Step 3 - Test the ChangesFor this example, we're going to use ODXSQL to make sure the synonym list is automatically used.
Run ODXSQL and connect to the environment. odxsql orders > Execute a select statement using criteria against the contact column. Use a normal column='criteria' predicate. select contact from customers where contact='kathy' This query returns all customers with the contact name Kathy, Kathleen,
Cathy and Catherine. Synonyms of Kathy were automatically added to the
criteria list.
|
|
Tutorials | Text![]() |
Programming
![]() |
Utilities
![]() |
Basics![]() |
Auto Enable a Synonym List |
Add a New Synonym List |
Modify a Synonym List |
Setup & Install ODXAIM |
Install ODXAIM as a Windows Service |