3.6 Adding eDirectory Indexes

Indexes are used to sort the entries in the replicas of the local server according to specified attributes. They significantly increase search performance and allow the display of sorted results. NDS 8 and above ship with predefined indexes for commonly used attributes. NDS eDirectory 8.5 allows you to specify additional attributes for indexing.

However, each additional index adds overhead to update operations. Before adding an index, you should check the Predicate Data on the server to see if any of the attributes your application is using would benefit from an index. For more information, see the Administration Guide for eDirectory eDirectory 8.7.3.

To specify an index in an LDIF file, you must supply values for following case ignore strings which are separated by a dollar ($) sign.

Order

String

Description

1

Index version

Reserved for future use. In NDS eDirectory 8.5, this should always be set to zero (0).

2

Index name

Specifies the user-defined name for the index, such as “Family Name” or “Zip Code.” The string should not contain the dollar ($) sign.

3

Index state

Specifies the state of the index. When defining an index, this field should be set to 2 (online). eDirectory supports the following values:

  • 0—suspended which indicates the index is not used in queries and is not updated.

  • 1—bringing online which indicates the index is in the process of being created.

  • 2—online which indicates the index is up and working.

  • 3—pending creation which indicates the index has been defined and is waiting for the background process to run.

The background process changes the state once the building begins.

4

Index rule

Specifies the type of matching:

  • 0—Value matching which optimizes queries that involve the entire value or the first part of the value, for example, a query for all entries with a surname equal to Jensen or begin with Jen.

  • 1—Presence matching which optimizes queries that involve only the presence of an attribute, for example, a query for all entries with a surname attribute.

  • 2—Substring matching which optimizes queries that involve a match of a few characters, for example, a query for all entries with a surname containing “der”. This query returns entries with the surnames of Derington, Anderson, and Lauder.

5

Index type

Specifies who created the index. When defining an index, you must set this value to 0. eDirectory supports the following values:

  • 0—user defined

  • 1—added on attribute creation

  • 2—required for operation

  • 3—system index

6

Index value state

Specifies the source of the index. When defining an index, set this string to 1. eDirectory supports the following values:

  • 0—uninitialized

  • 1—added from server

  • 2—added from local DIB

  • 3—deleted from local DIB

  • 4—modified from local DIB

7

Attribute name

Specifies the NDS name for the attribute. Many attributes in eDirectory have both an LDAP name and an NDS name. This string requires the NDS name.

The following example shows how to add an index for the mail attribute (which has an NDS name of EMail Address).

 version: 1
 
 dn: cn=Kim Jones, ou=English, ou=Humanities, o=UofZ
 changetype: modify
 add: indexDefinition
 indexDefinition: 0$myEmailIndex$2$1$0$1$Email Address