Indexing Registry entries
The use of Null and Partial based indexing provides mechanisms for enhancing response times for certain types of searches. While it may be tempting to enable these methods on a large number of fields, there is a trade-off: the more fields that have extra indexing enabled, the more disk space is required to store those indexes.
A series of Registry entries is available to specify which fields should have which indexing options enabled.
This Registry entry is assigned at the system level only:
Key | System | System | System | System | System |
---|---|---|---|---|---|
Key 1 | System
|
System
|
System
|
System
|
System
|
Key 2 | Setting
|
Setting
|
Setting
|
Setting
|
Setting
|
Key 3 | Table
|
Table
|
Table
|
Table
|
Table
|
Key 4 | table | table | table | table | table |
Key 5 | Stem Index
|
Phonetic Index
|
Null Index
|
Partial Index
|
Unique Index
|
Value | column;column;... | column;column;... | column;column;... | column=parts;column=parts;... | column;column;... |
System
|
Setting
|
Table
|
table | Stem Index
|
column;column;... |
System
|
Setting
|
Table
|
table | Phonetic Index
|
column;column;... |
System
|
Setting
|
Table
|
table | Null Index
|
column;column;... |
System
|
Setting
|
Table
|
table | Partial Index
|
column=parts;column=parts;... |
System
|
Setting
|
Table
|
table | Unique Index
|
column;column;... |
where:
table |
is the name of the table in which indexing is to be set. |
column;column;... |
is a semicolon separated list of columns (one or more) on which the indexing is to be applied. |
column=parts;... |
(for Partial indexing only) is a semicolon separated list of columns (column) on which the indexing is to be applied and numbers (parts) indicating the number of initial letters used for the Partial index (see example below). |
EMu provides two different Registry entries for specifying the uniqueness of fields, the Unique Registry entry and the Unique Index Registry entry. Both of these entries can be used to specify uniqueness, but there are differences between the two.
Note: See Unique-valued fields for details of the differences between the two.
The Unique Index Registry entry allows columns to be specified as unique and is required in order to enable auto-incrementation of a value in a field. In general, unless you are looking to enable uniqueness checking and auto-incrementation of a value in a field, it is recommended that you use the Unique Registry entry to specify the uniqueness of columns.
Note: Support for linked Unique columns (i.e. multi-part Unique settings) is not provided with the Unique Index Registry setting.
To enable Null based indexing on the organization name for example, this entry could be used:
Key | Setting |
---|---|
Key 1 | System
|
Key 2 | Setting
|
Key 3 | Table
|
Key 4 | eparties
|
Key 5 | Null Index
|
Value | NamOrganisation
|
You may also want to enable Partial based indexing on the organization and Other Names fields. In order to provide fast wildcard searching you may decide to use the first, first three and first five letters to produce terms. This entry could be used:
Key | Setting |
---|---|
Key 1 | System
|
Key 2 | Setting
|
Key 3 | Table
|
Key 4 | eparties
|
Key 5 | Partial Index
|
Value | NamOrganisation=1,3,5;NamOtherNames_tab=1,3,5
|
Once the entries have been added to the Registry, the new indexing methods will be applied when the next index rebuild is performed. For most institutions this is on the weekend. If the indexes are required earlier, an index rebuild should be initiated manually.
If you have access to the EMu server, then emureindex -p -f
should be executed.
If not:
- Add the following entry to the Registry:
User
emu
Table
eadmin
Admin Task
Re-index System
emureindex -p -f
- Log in as user emu.
- Run the Re-index System Admin job.
Re-indexing may take some time and must not be performed while access to the System is required. Once the re-index begins, EMu is taken off-line (users cannot log in, web access is disabled) until it completes. Generally, for larger systems, re-indexing should only be performed overnight.
The current implementation only allows index methods to be added to columns. It is not possible to remove indexing methods once they have been added (unless you are familiar with altering schema characteristics via texdesign). Removing the Registry entry once the index has been added does not remove it from the System until the next upgrade occurs. When EMu is upgraded, the changed tables are replaced with the "standard" distribution tables. When the first re-index is run (as part of the upgrade), your extra indexing methods will be applied.
Finally, it is not possible to have both Stem and Phonetic based indexing on the same column. When one of these methods is enabled, the other is disabled automatically.