|
OMNIDEX |
Omnidex Text |
|
$CONTAINSOmnidex specializes in textual searches and provides a rich suite of tools for locating rows containing specific keywords and their variations. $CONTAINS is an Omnidex extended function designed to overcome some of the limitations of standard SQL with respect textual searches. The $CONTAINS function is used as a SELECT statement criteria predicate to allow complex qualification criteria against a text field using proximity, synonym, spell-checked and misspelling searches, as well as form and phonetic searches. $CONTAINS is also a prerequisite for using the $SCORE and $CONTEXT functions, which provide relevancy scoring and context excerpts. The criteria in $CONTAINS apply to parsed words within a column and can include parenthetical and Boolean relationships between words. The $CONTAINS function is unusual in that it comprises an entire predicate rather than being used as a left or right predicate operand. A $CONTAINS criteria predicate can be used to specify criteria for any MDK indexed column, even when no special text search functions are being performed. Additionally, QUALIFY syntax criteria can be passed in the criteria string. These are shown below in Examples. A SELECT statement WHERE clause can contain multiple $CONTAINS functions, however, a label must be used to identify each predicate. The $CONTAINS function returns a Boolean TRUE or FALSE.
Syntax$CONTAINS(column, 'criteria'[, 'options'[, 'label']]) column criteria options label
OptionsPrimary OptionsSYNONYMS[=list] SPELLCHECK[=list] MISSPELLINGS FORMS[=approach] PHONETIC STOPWORDS[=list] Secondary OptionsThe secondary options configure the way that the primary options are applied: INCLUSIVE EXCLUSIVE PARTOFSPEECH=pos SENSE=n MAX_SENSES=n | ALL
ExamplesThe following example performs a proximity search. Proximity searches require that the ;PX option be installed on the column. SELECT * FROM CATALOG WHERE The next example searches for companies using synonyms of 'AMA', which are listed in the ALL_ACRONYMS managed synonyms list. SELECT COMPANY FROM PROSPECTS WHERE The following two criteria predicates are identical and can be used interchangeably, showing how a $CONTAINS criteria predicate can be used in place of a normal criteria predicate on any column indexed with MDK indexes. ... COMPANY = 'SYSTEMS' ... $CONTAINS(COMPANY,'SYSTEMS') The next examples show how to use QUALIFY syntax in place of normal SELECT syntax, in a $CONTAINS predicate. SELECT QUANTITY, STATUS FROM ORDERS WHERE $CONTAINS(QUANTITY,'(> 10)') SELECT COMPANY FROM PROSPECTS WHERE $CONTAINS(PROSPECTS.COMPANY,'(SYNONYMS(AMA,"ALL_ACRONYMS"))',,'LBL1') SELECT COMPANY FROM PROSPECTS WHERE $CONTAINS(PROSPECTS.COMPANY,'(systems or software)',,'LBL1')
|
|
Environment Catalog | Database Integration | Omnidex Text | Other Features |
Environment |
Database |
Table |
Column |
Rule |
Index |
Message |
SQL Server |
Oracle |
DB2 |
Flat Files |
External Documents |
Configuration |
Keyword Searches |
Synonym Searches |
Proximity Searches |
Form Searches |
Misspelling Searches |
Spell Check Searches |
Phonetic Searches |
Exporting Data |
Pseudo-columns |
Partitioning |