This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
admin:indexing:powersearch:custom [2011/01/24 19:20] els |
admin:indexing:powersearch:custom [2012/10/26 14:57] (current) |
||
|---|---|---|---|
| Line 18: | Line 18: | ||
| ==== Custom Synonym Lists ==== | ==== Custom Synonym Lists ==== | ||
| - | Synonym lists are an important tool for PowerSearch. Synonym lists allow your search terms to be automatically expanded to make your search more flexibility. The examples on the previous pages used many synonym lists, such as Given Names, Postal Abbreviations, City Names and Area Codes. Omnidex provides a base set of synonym lists as part of the product, but it is also possible to create your own synonym lists. | + | Synonym lists are an important tool for PowerSearch. Synonym lists allow your search terms to be automatically expanded to make your search more flexibile. The examples on the previous pages used many synonym lists, such as Given Names, Postal Abbreviations, City Names and Area Codes. Omnidex provides a base set of synonym lists as part of the product, but it is also possible to create your own synonym lists. |
| - | Synonym lists are using limited to a limited topic, such as Given Names, or City Abbreviations. It is important to watch for cross-over between synonyms. For example, it would be prudent to keep city, state and country abbreviations in separate lists. LA as a city code is an abbreviation for Los Angeles; however, as a state code, it is an abbreviation for Louisiana. In these situations, each column should use its own managed synonym list so that overlap does not occur. | + | Synonym lists are usually limited to a specific topic, such as Given Names, or City Abbreviations. It is important to watch for cross-overs between synonyms. For example, it would be prudent to keep city, state and country abbreviations in separate lists. LA as a city code is an abbreviation for Los Angeles; however, as a state code, it is an abbreviation for Louisiana. In these situations, each column should use its own managed synonym list so that overlap does not occur. |
| ==== The Synonym List Library ==== | ==== The Synonym List Library ==== | ||
| Line 34: | Line 34: | ||
| ^ Column Name ^ Datatype ^ | ^ Column Name ^ Datatype ^ | ||
| | $LIST | CHARACTER(32) | | | $LIST | CHARACTER(32) | | ||
| - | | $WORD | C STRING(127) | | + | | $WORD | STRING(127) | |
| - | | $REPLACEMENT | C STRING(4094) | | + | | $REPLACEMENT | STRING(4094) | |
| - | |$COMMENTS | C STRING(255) | | + | |$COMMENTS | STRING(255) | |
| === $LIST === | === $LIST === | ||
| - | The name of the list, repeated for each row in the list. This name will be referenced in the $CONTAINS clause using the syntax, 'SYNONYMS=list'. | + | The name of the list, repeated for each row in the list. This name will be referenced in the $CONTAINS clause using the syntax, 'SYNONYMS=list'. Be sure to choose a list that does not conflict with an existing list in the library. |
| === $WORD === | === $WORD === | ||
| Line 55: | Line 55: | ||
| == Words and Phrases == | == Words and Phrases == | ||
| - | Replacements can be a word or phrase to be used in replace of the current word. Note that for the synonyms to include the current word itself, it must be included in the replacement text. Words may be separated by commas. Phrases must be enclosed in double-quotation marks. For example: | + | Replacements can be a word or phrase to be used in place of the current word. Note that for the synonyms to include the current word itself, it must be included in the replacement text. Words may be separated by commas. Phrases must be enclosed in double-quotation marks. For example: |
| ^ $LIST ^ $WORD ^ $REPLACEMENT ^ $COMMENTS ^ | ^ $LIST ^ $WORD ^ $REPLACEMENT ^ $COMMENTS ^ | ||
| Line 81: | Line 81: | ||
| | FIRST_NAMES | FREDRICK | Fredrick, Fred, Rick | | | | FIRST_NAMES | FREDRICK | Fredrick, Fred, Rick | | | ||
| | FIRST_NAMES | RICK | Rick, Ricky, Richard, Dick, >Fredrick | | | | FIRST_NAMES | RICK | Rick, Ricky, Richard, Dick, >Fredrick | | | ||
| + | |||
| + | |||
| + | ==== Installing a New Synonym List ==== | ||
| + | |||
| + | Installing a new synonym list is as simple as saving the file in the synonym directory. The synonym directory is as follows: | ||
| + | |||
| + | Windows: | ||
| + | |||
| + | %OMNIDEX_HOME%\config\english\synonyms | ||
| + | |||
| + | UNIX: | ||
| + | |||
| + | $OMNIDEX_HOME/config/english/synonyms | ||
| + | |||
| + | After the file has been installed, it must be indexed. This is done using the following command: | ||
| + | |||
| + | Windows: | ||
| + | |||
| + | cd %OMNIDEX_HOME%\config | ||
| + | build_config.bat | ||
| + | |||
| + | UNIX: | ||
| + | |||
| + | cd $OMNIDEX_HOME/config | ||
| + | build_config.ksh | ||
| + | |||
| + | ==== Testing a New Synonym List ==== | ||
| + | |||
| + | Once a synonym list has been installed, it can be tested using the following command in OdxSQL. In this example, replace the values in angle brackets with values appropriate to your database. | ||
| + | |||
| + | connect <environment> | ||
| + | lookup $contains(<table>.<column>, 'criteria', 'SYNONYMS=<list>') | ||
| + | |||
| + | As an example, this same command is shown running against the ALL_GIVEN_NAMES synonym list: | ||
| + | |||
| + | > connect simple | ||
| + | Connected to D:\class\lab2\simple.xml | ||
| + | > lookup $contains(individuals.name, 'William', 'synonyms=ALL_GIVEN_NAMES') | ||
| + | IN (William, Bill, Billy, Will, Williams, Willie, Willis, Wilson) | ||
| + | |||
| + | |||