Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
admin:indexing:powersearch:custom [2011/03/22 21:42]
deb
admin:indexing:powersearch:custom [2016/06/28 22:38] (current)
Line 15: Line 15:
  
 ---- ----
 +
 +==== Custom Usages ====
 +
 +Usages are essential to the customization of PowerSearch. ​ The POWERSEARCH option instructs Omnidex to evaluate the columns referenced in the WHERE clause of the SELECT statement, and matches their USAGE clauses with the preconfigured instructions for each USAGE. ​ These instructions describe actions such as using synonyms, checking for misspelling,​ or even doing geographic searches.  ​
 +
 +
 +=== The Usages File Layout ===
 +
 +These preconfigured instructions can be customized or expanded to meet the needs of each application. ​ The usage instructions exist in a tab-delimited file with six columns. ​ It can be modified using a text editor such as '​Notepad'​ on Windows or '​vi'​ on UNIX.  It can also be created in a spreadsheet program such as Microsoft Excel, which allows a file to be saved as a Tab-Delimited File.
 +
 +The record layout of the usages table consists of six columns:
 +
 +^ Column Name        ^ Datatype ​      ​^ ​
 +| $LIST              | CHARACTER(32) ​ | 
 +| $USAGE ​            | CHARACTER(32) ​ |
 +| $PARSING ​          | CHARACTER(32) ​ |
 +| $FORMAT ​           | CHARACTER(255) |
 +| $POWERSEARCH ​      | STRING(4094) ​  |
 +| $COMMENTS ​         | STRING(255) ​   | 
 +
 +== $LIST ==
 +
 +The name of the list, repeated for each row in the list.  This name can be optionally referenced in the POWERSEARCH option to specify a specific list of usages. ​ This allows different applications to use different sets of PowerSearch instructions. ​ Omnidex is shipped with only one list named DEFAULT, which is used if no list is provided.  ​
 +
 +== $USAGE ==
 +
 +The name of the usage as declared for the column in the CREATE TABLE statement. ​  
 +
 +== $PARSING ==
 +
 +This column is reserved for future use and not used in this version of Omnidex.
 +
 +== $FORMAT ==
 +
 +This column is reserved for future use and not used in this version of Omnidex.
 +
 +== $POWERSEARCH ==
 +
 +The replacement string to be substituted in the WHERE clause when the POWERSEARCH option is used.  There are special tokens that can be referenced in this field:
 +
 +  * %COLUMN% - This token is replaced with the name of the column applying this usage.
 +  * %CRITERIA% - This token is replaced with the criteria passed in the WHERE clause for this column.
 +
 +Typically, the replacement string uses a [[dev:​sql:​functions:​contains|$CONTAINS]] clause that applies synonyms, misspellings or other Omnidex features. ​ The use of a $CONTAINS clause is not required, though. ​ While every SQL construct cannot be supported, administrators can use a wide variety of SQL clauses in this section, including complex, parenthesized,​ Boolean predicates, nested queries, etc.
 +
 +== $COMMENTS ==
 +
 +Comments that are useful to the administrator to document this usage.
 +
 +
  
 ==== Custom Synonym Lists ==== ==== Custom Synonym Lists ====
Line 22: Line 72:
 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.  ​ 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 ===
  
 Before creating your own synonym lists, be sure to check the [[appendix:​synonyms|synonym lists]] that are provided with Omnidex. ​ The list you need may have already been created, or there may be a similar list that you can use as a starting point. ​ If you do create your own synonym list, consider whether it would benefit the broader Omnidex community. ​ If you would like to submit a synonym list for inclusion in the product, simply send it to [[appendix:​contactus|Technical Support]] with a note saying that you are contributing it to the product. Before creating your own synonym lists, be sure to check the [[appendix:​synonyms|synonym lists]] that are provided with Omnidex. ​ The list you need may have already been created, or there may be a similar list that you can use as a starting point. ​ If you do create your own synonym list, consider whether it would benefit the broader Omnidex community. ​ If you would like to submit a synonym list for inclusion in the product, simply send it to [[appendix:​contactus|Technical Support]] with a note saying that you are contributing it to the product.
  
-==== The Synonym List File Layout ​====+=== The Synonym List File Layout ===
  
 Creating a new synonym list is straightforward. ​ It is simply a tab-delimited file with four columns. ​ It can be created using a text editor such as '​Notepad'​ on Windows or '​vi'​ on UNIX.  It can also be created in a spreadsheet program such as Microsoft Excel, which allows a file to be saved as a Tab-Delimited File. Creating a new synonym list is straightforward. ​ It is simply a tab-delimited file with four columns. ​ It can be created using a text editor such as '​Notepad'​ on Windows or '​vi'​ on UNIX.  It can also be created in a spreadsheet program such as Microsoft Excel, which allows a file to be saved as a Tab-Delimited File.
Line 36: Line 86:
 | $WORD              | STRING(127) ​   |  | $WORD              | STRING(127) ​   | 
 | $REPLACEMENT ​      | STRING(4094) ​  ​| ​ | $REPLACEMENT ​      | STRING(4094) ​  ​| ​
-|$COMMENTS ​          ​| 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'​. ​ Be sure to choose a list that does not conflict with an existing list in the library.  ​ 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 ==
  
 The word or phrase for which synonyms are being created. ​ Phrases should be enclosed in double quotes. ​ The word or phrase for which synonyms are being created. ​ Phrases should be enclosed in double quotes. ​
  
-=== $REPLACEMENT ​===+== $REPLACEMENT ==
  
 The replacement string to be used as a synonym list.  Normally, this is a comma-delimited list of synonyms; however, it can be any of the following choices, intermingled and in any order. ​ The replacement string to be used as a synonym list.  Normally, this is a comma-delimited list of synonyms; however, it can be any of the following choices, intermingled and in any order. ​
Line 53: Line 103:
 Replacements may consist of any of the following choices. ​ Replacements may also be intermingled,​ and occur in any order. Replacements may consist of any of the following choices. ​ Replacements may also be intermingled,​ and occur in any order.
  
-== Words and Phrases ​==+** Words and Phrases ​**
  
 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: 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:
Line 64: Line 114:
  
  
-== Qualification Criteria ​==+** Qualification Criteria ​**
  
 Replacements can be qualification criteria, indicated by enclosing the entire replacement string in parentheses. ​ These criteria may include Boolean operators and nested parentheses. ​ For example: Replacements can be qualification criteria, indicated by enclosing the entire replacement string in parentheses. ​ These criteria may include Boolean operators and nested parentheses. ​ For example:
Line 73: Line 123:
 | DATE_RANGES ​ | FISCAL_2011 | (Between 7/1/2010 and 6/​30/​2011) ​  ​| ​          |== | DATE_RANGES ​ | FISCAL_2011 | (Between 7/1/2010 and 6/​30/​2011) ​  ​| ​          |==
  
-== Pointers to Other Entries ​== +** Pointers to Other Entries ​** 
  
 Replacements can be pointers to other entries within the same list.  Pointers are indicated by prefixing the word with a greater-than sign (>​). ​ Pointers are allowed to be nested. ​ For example: Replacements can be pointers to other entries within the same list.  Pointers are indicated by prefixing the word with a greater-than sign (>​). ​ Pointers are allowed to be nested. ​ For example:
Line 82: Line 132:
 | FIRST_NAMES ​ | RICK        | Rick, Ricky, Richard, Dick, >​Fredrick |           | | FIRST_NAMES ​ | RICK        | Rick, Ricky, Richard, Dick, >​Fredrick |           |
  
 +== $COMMENTS ==
 +
 +Comments that are useful to the administrator in documenting this synonym.
  
-==== Installing a New Synonym List ====+=== 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: Installing a new synonym list is as simple as saving the file in the synonym directory. ​ The synonym directory is as follows:
Line 107: Line 160:
   build_config.ksh   build_config.ksh
  
-==== Testing a New Synonym List ====+=== 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. 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.
 
Back to top
admin/indexing/powersearch/custom.1300830128.txt.gz ยท Last modified: 2016/06/28 22:38 (external edit)