<index>
The <index> element defines an index on the database table used to store the data for an entity. Guidewire defines this element in the data model metadata files as the <index> XML subelement. This element contains a required subelement, which is <indexcol>.
The <index> element instructs PolicyCenter to create an index on the physical database table. This index is in addition to those indexes that PolicyCenter creates automatically.
An index improves the performance of a query search within the database. It consists of one or more fields that you can use together in a single search. You can define multiple <index> elements within an entity, with each one defining a separate index. If a field is already part of one index, you do not need to define a separate index containing only that field.
For example, PolicyCenter frequently searches non-retired accounts for one with a particular account number. Therefore, the Account entity defines an index containing both the Retired and AccountNumber fields. However, another common search uses just AccountNumber. Since that field is already part of another index, a separate index containing only AccountNumber is unnecessary.
A column used in an index cannot have a length of more than 1000 characters.
Attributes of <index>
The <index> element contains the following attributes.
|
Description |
Default |
|---|---|---|
|
A description of the purpose and use of the index. |
None |
|
If Thus, if |
|
|
Required. The name of the index. The first character of the name must be a letter. The maximum length for an index name is 18 characters. IMPORTANT For |
None |
|
If |
|
|
Whether the values of the index are unique for each row. Note: When you set the unique attribute to Exceptional cases arise if the unique attribute is true and either the index consists of only a single column or the index has an ID column. In these cases, the database defines the index as unique. |
|
|
If |
|
Subelements of <index>
The <index> element contains the following subelements.
|
Description |
Default |
|---|---|---|
|
Use to force PolicyCenter to create an index if running against a particular database. This subelement is useful because the index generation algorithm can throw away some declared indexes as being redundant. In some cases, PolicyCenter can require one or more of those indexes to work around an optimization problem. This subelement contains the following attributes:
|
None |
|
Required. Defines a field that is part of the index. You can specify multiple
The column cannot have a length of more than 1000 characters. |
None |
