Table of Contents

Search

  1. Preface
  2. Introduction
  3. Defining a System
  4. Flattening IDTs
  5. Link Tables
  6. Loading a System
  7. Static Clustering
  8. Simple Search
  9. Search Performance
  10. Miscellaneous Issues
  11. Limitations
  12. Error Messages

Key-Logic / Search-Logic

Key-Logic / Search-Logic

KEY-LOGIC
is defined in the IDX-Definition to describe how to build keys to be stored in the IDX. Search-Logic is defined in the Search-Definition to specify how to build search ranges to read the IDX.
An IDX normally contains multiple fuzzy keys for each IDT record. Each IDX contains compressed display and matching data. This is known as a heavy index. IIR can also create a Lite Index . This is a native DBMS index containing exact values from a single field in the IDT record. A Lite index does not contain any redundant display or matching data. Searches utilizing a Lite Index will acquire display and matching data by reading the IDT record.

Syntax

Key-logic facilities are provided by a SSA-NAME3 Standard or Custom Population. The syntax is as follows:
KEY|SEARCH-LOGIC = SSA, System (system), Population (population), Controls (controls), Field(field_list), Null-Field(null-field-value), Null-Key(null-key-value)
where
system
is the System Name of the Population Rules DLL. The system is a sub-directory of the population rules directory. It has a maximum length of 32 bytes. The location of the population rules directory is defined by the environment variable
SSAPR
. The System Name is case sensitive and it should be same as the sub-directory name.
population
defines the name of the population DLL in the System directory (maximum length of 32 bytes).
Population Name is case sensitive and it should be exactly similar to the one defined in the licence file.
controls
defines the Controls to be used. Refer to the
STANDARD POPULATIONS
guide for a detailed description of these fields.
field_list
is a comma-separated list of IDT fields to be used to generate keys or ranges. If more than one field is provided, the field_list must be enclosed in quotes (").
null_field_value
An optional parameter that defines the null value for the Field. Records with a null value in their key field can be ignored by using the NO-NULL-FIELD option to prevent them from being indexed in the IDX. The default value is spaces (blanks).
null_key_value
An optional parameter that defines the value of a null key. Records containing fields that generate a null key can be ignored by using the
NO-NULL-KEY
option to prevent the key from being stored in the IDX. The default value is
K$$$$$$$
.

Controls

A Key-Logic in an IDX-Definition controls the generation of keys. Therefore the Controls should specify the
KEY_LEVEL
. For example,
KEY-LOGIC=SSA, System(default), Population(test), Controls("FIELD=Person_Name KEY_LEVEL=Standard"), Field(LastName)
A Search-Logic in a Search-Definition controls the generation of search ranges. Therefore the Controls should specify a
SEARCH_LEVEL
. For example,
SEARCH-LOGIC=SSA, System(default), Population(test), Controls("FIELD=Person_Name SEARCH_LEVEL=Typical"), Field(LastName)

Repeating Key Fields

The Field parameter of the Key- or Search-Logic can be used to generate keys or ranges for multiple fields (of the same type). This is accomplished by specifying a list of fields. For example:
KEY-LOGIC=SSA, System(default), Population(test), Controls("FIELD=Person_Name KEY_LEVEL=Standard"), Field("InsuredName,ClaimantName,PayeeName")
will generate keys for all three name fields and store them in the IDX.
When indexing a Group of repeating fields (or flattened fields), you must list each individual field name. For example, the following source definition,
test.person.name Name [5] C(20)
generates a Group in the File-Definition of this IDT, which is subsequently expanded to the following list of field names:
FIELD=Name, C, 20 FIELD=Name_2, C, 20 FIELD=Name_3, C, 20 FIELD=Name_4, C, 20 FIELD=Name_5, C, 20
A Key-Logic that indexes all occurrences must list each individual field:
KEY-LOGIC=SSA, System(default), Population(test), Controls("FIELD=Person_Name KEY_LEVEL=Standard"), Field("Name,Name_2,Name_3,Name_4,Name_5")
A shorthand method of specifying repeating fields exists and takes the form of:
field [ * | {x | y-z }, ... ]
Some examples of this notation are (assuming a maximum of 5 occurrences):
Name[1-5] = Name,Name_2,Name_3,Name_4,Name_5 Name[2,3] = Name[2-3] = Name_2,Name_3 Name[1,4-5]= Name,Name_4,Name_5 Name[5] = Name_5 Name[*] = Name,Name_2,Name_3,Name_4,Name_5
Therefore some of the ways the above Key-Logic example could also be written are:
KEY-LOGIC=SSA, System(default), Population(test), Controls("FIELD=Person_Name KEY_LEVEL=Standard"), Field("Name[*]") KEY-LOGIC=SSA, System(default), Population(test), Controls("FIELD=Person_Name KEY_LEVEL=Standard"), Field("Name[1-5]") KEY-LOGIC=SSA, System(default), Population(test), Controls("FIELD=Person_Name KEY_LEVEL=Standard"), Field("Name[1,2,3,4,5]")

Specifying Null Values

You can specify the optional
null-field-value
and
null-key-value
parameters in one of the following formats:
Simple text string. For example,
abc
or
"abc"
.
A hexadecimal value. For example,
Hex(8000000000)
.
A filled string. For example,
Fill(" ", 5)
for five blank spaces.
A single character. For example,
Numeric(0)
for 0 byte.
A sequence of values in parentheses. For example,
("ab", numeric(10), cd, Fill (numeric(0), 15))
.

Lite Index

Lite Indexes have lower storage costs than heavy indexes, but they require additional I/O when you use them in a search.
Use the following syntax to create keys and ranges for a Lite Index:
KEY-LOGIC=User, Field(field)
, where
field
is the name of the column in the IDT that you want to index.
The
Key-Logic
parameter for the IDX-Definition must specify
OPTIONS=Lite
.
The
Key-Logic=User
parameter does not support the
NO-NULL-FIELD
and
NO-NULL-KEY
options because the database that you use controls the user-type index.
A Lite Index does not support the
KEY-SCORE-LOGIC
and
KEY-PRE-SCORE-LOGIC
keywords.

SSA-NAME3 v1

Parameters supporting SSA-NAME3 v1 are no longer documented in this manual, as SSA-NAME3 v2 (or later) is the recommended version to use with IIR. Refer to a previous version of this guide if you require information about deprecated parameters.

0 COMMENTS

We’d like to hear from you!