Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

OMNIDEX

Omnidex Text

Indexing Text Fields for Keyword Searches

Case Insensitive Searches

Example

 

Omnidex Text

Keyword Searches

Keyword searches are queries that find data based on an individual keyword parsed from a text field. Generally, keywords are delineated by a space or punctuation mark, though special rules exist for special situations.

Keyword searching is available through standard SQL and also through the $CONTAINS function. When processing a SELECT statement, Omnidex examines the type of index installed on each column. If criteria are applied to a column installed with a keyword, the criteria will be interpreted as a set of keywords, rather than a phrase. For example, given the criteria "content like 'cell phone' ", the SQL optimizer would interpret this as "content like 'cell' AND content like 'phone' ". Each of these words could occur anywhere in the column, and in any order, as long as they were separated by spaces, punctuation or other words.

Using this criteria, records 1 & 2 will qualify but 3 will not because there is cellphone is a single word. However, you could use a wildcard to qualify record 3, "content like 'cell*' ", which would also qualify records containing the word cellular.

1 "The scientist used the phone to report his amazing discoveries concerning a single living cell."

2 "The telephone company is going to install a cell phone tower on the corner."

3 "What I want for my birthday: new car, cellphone, new clothes"

To prevent the criteria from being interpreted in this way, you could use a Proximity search, which provides a couple of methods for this type of search.

 

 

Indexing Text Fields for Keyword Searches

To install keyword indexing on a text field, use the ;KW option. Columns installed with the ;KW option will be parsed into individual keywords. Spaces and punctuation are stripped (not stored in the indexes, the data is unchanged). To prevent stop words (the, of, a, and, ...) from being indexed, use an excluded words list.

The ;KW option can be applied to a single column or a group of columns using the ;Gn (grouping) option. For example, if two address fields and the city field are grouped together, as follows:

ADDRESS1;G1;KW
ADDRESS2;G1;KW
CITY;G1;KW

a search like " address1 = 'boulder' " would qualify all rows that contained the word 'boulder' in any of the three grouped columns.

ID

ADDRESS1

ADDRESS2

CITY

1

123 BOULDER AVENUE

UNIT 6

FRESNO

2

987 COLORADO BLVD.

 

BOULDER

3

456 MAIN ST.

BOULDER CENTER

MIAMI

 

 

Case Insensitive Searches

Case Insensitive searches allow users to find records using keywords without having to worry how it is stored in the database.

By default, keyword searches are case insensitive. This means criteria like "company = 'systems' " will find all records with the word 'systems' in it: systems, SYSTEMS, Systems, SyStEmS, ...

To use keyword searches while keeping the search case sensitive, use the ;KW (keywording) and ;CS (case sensitive) options together.

COLUMN;KW;CS

For example:

SELECT COMPANY FROM CUSTOMERS WHERE COMPANY = 'SYSTEMS'

will qualify all of the following customer records:

1 Dynamic Information Systems Corporation

2 COMPUTER SYSTEMS SOFTWARE

3 consumer systems

Case insensitive search capabilities can be enabled by installing either the ;CI (case insensitive) option or the ;KW (keywording) option.

The ;CI option can be installed no parse text fields, like a state code field, to enable case insensitivity.

The ;KW option automatically causes case insensitive searches.

To enable both keyword searches and case sensitivity, install the ;KW option and the ;CS (case sensitive) option together.

 

Example

> SELECT COMPANY FROM COMPANIES WHERE COMPANY = 'AMERICAN'

COMPANY
---------------------------------------
Aberdeen American News
All American Products
American Agco
American Airlines
American Appliance Manufacturing Corp.
American Association Respiratory Care
American Baptist Computer Center, Inc.
American Baptist Credit Union
American Cancer Society
American Cimflex, Inc.
American Circuit Breaker Corporation
American Civil Liberties Union
American Civil Liberties Union (ACLU)
American Color
American Computer Services, Inc.
American Conservatory Theatre
American Contact Lens
American Custom Metals
American Cyanamid
American Cyanamid Company
Press <RETURN> to continue, 'Q' to quit or '/' to stop paging ...

COMPANY
---------------------------------------
American Educational Complex
American Electronics Association
American Fashion, Inc.
American Fine Foods
American First Federal Credit Union
American Floral Services, Inc.
American Foliage Company
American Furniture Company
American Genealogical Lending Library
American General Securities, Inc.
American Golf Corporation
American Healthcare Systems
American Home Shield
American Institutes for Research
American International Devices
American International Healthcare
American Legal Systems
American Legion Hospital
American Marazzi Tile Inc.
American Medical Electronics
Press <RETURN> to continue, 'Q' to quit or '/' to stop paging ...

COMPANY
---------------------------------------
American Newspaper Publishers Assoc.
American Nursing Care, Inc.
American Occupational Therapy Assoc.
American Optical Corporation
American Physician Service
American Physicians Service
American Plywood Association
American Podiatric Medical Association
American Power Conversion
American Prestige
American Prestigue
American Printer Magazine
American Products Company
American Protective Services
American Protective Services, Inc.
American Red Cross
American Red Cross, Snake River Region
American Redemption Systems
American River College
American Software
Press <RETURN> to continue, 'Q' to quit or '/' to stop paging ...

COMPANY
---------------------------------------
American Spring and Wire Specialist
American Steel and Wire Corporation
American Synthetic Rubber Corporation
American United Life Insurance
American United Life Insurance Company
Arabian-American Oil Company
Barratt American
Basic American Foods
First American Home Buyers
First American Title Insurance
Glista American, Inc.
Glitsa American Inc
Great American Trading Company
Great American Trading Inc.
Lake Charles American Press Company
North American Publishing
North American Salt
North American Van Lines
Salyer American Fresh Foods
79 rows returned
>

 

 

 

 

Top