Managing eDirectory Indexes



By: palaniappan1

August 31, 2010 1:36 pm

Reads: 417

Comments:1

Rating:0

Indexes:

In eDirectory, the Index Manager attribute, as the name suggests, acts as an database index manager to maximize the query performance of eDirectory. An attribute can be indexed to improve the performance of the queries involving the corresponding attribute. And there are a set of default indexes (indexed attributes) with every eDirectory installation. These attributes are nothing but the ones used mostly in eDirectory searches. The following are the automatically-indexed-attributes of eDirectory:

cn, dc, Given Name, surname, uniqueID, GUID, Aliased Object Name, ldapAttributeList, ldapClassList, obituary, member, reference, Equivalent to Me, NLS: Common Certificate, Revision, cn_SS, uniqueID_SS and extensionInfo.

And adding more to it, you have your own customized / customizable indexes as well. If you know that your enterprise uses a particular attribute in queries frequently, that specific attribute can be indexed.

Managing Indexes through iManager:

iManager is a tool through which you can manage your indexes efficiently. Managing here means reading, creating, deleting and modifying the indexes.

Creating an index:

  1. Open Novell iManager and click the Roles and Tasks button
  2. Go to the eDirectory Maintenance role, find the Indexes (or Index Management) task and click on it.
  3. It’ll list all the available servers. Select a server from the list and click.
  4. You’ll be shown the ‘Modify Indexes’ page that will list all the available indexes in the selected server.
  5. Click ‘Create’ and enter the details as follows:
    1. Name of the index (if the index name is not entered, the attribute name will automatically be assigned as the index name). Note that ‘$’ is a delimiter and if you wish ‘$’ to be in the name of the index, then escape it.
    2. Select the attribute to be indexed from the drop down list that will show all the available attributes.
    3. Select the index rule. The explanation of different index rules are explained below in the appendix.
  6. Click OK in the pop-up window.
  7. Click ‘Apply’. This will restart the Limber process and update the changes in the server.

Taking an Index Offline:

In a production environment, to improve performance, there can be instances where you want to take indexes offline for a while. This is a common use case when a bulk load is being performed to the server (enabling indexes during bulk load may lower the bulk load performance). After the completion of the bulk load operation, the index can be brought back online.

  1. Open Novell iManager and click the Roles and Tasks button
  2. Go to the eDirectory Maintenance role, find the Indexes (or Index Management) task and click on it.
  3. It’ll list all the available servers. Select a server from the list and click.
  4. You’ll be shown the ‘Modify Indexes’ page that will list all the available indexes in the selected server.
  5. Select the indexes you want to take offline and click ChangeState. The details of the different Index States are explained below in the appendix.
  6. Click ‘Apply’.

Deleting an index:

Both the user defined and the default indexes can be deleted.

  1. Open Novell iManager and click the Roles and Tasks button
  2. Go to the eDirectory Maintenance role, find the Indexes (or Index Management) task and click on it.
  3. It’ll list all the available servers. Select a server from the list and click.
  4. You’ll be shown the ‘Modify Indexes’ page that will list all the available indexes in the selected server.
  5. Select the user- or auto-added index you want to delete.
  6. Click the ‘Delete’ button.
  7. Click ‘Apply’. This will restart the Limber process and update the changes in the server.

Managing Indexes through LDAP:

Indexes can be managed through LDAP as well. This article will explain how to manage indexes using LDIF files (and these LDIF files can used with any of the ldap utilities like ldapmodify, ICE, etc)

The steps would be as follows:

  1. Create an LDIF file to create/modify/delete indexed
  2. Import the LDIF to the server using any LDAP utility
  3. Trigger the LIMBER process to initiate the indexing update. If not, the update will automatically happen when the LIMBER process starts as per its schedule.

Writing the LDIF file:

You need to have a LDIF file with the LDAP attribute indexDefinition defined to modify an index.

Examples Files:

To create and index,

dn: cn=myserver,o=novell
changetype: modify
add: indexDefinition
indexDefinition: 0$titleIndex$2$2$0$1$title

To delete an index,

dn: cn=myserver, o=novell
changetype: modify
delete: indexDefinition
indexDefinition: 0$titleIndex$2$2$0$1$title

So, note that the attribute indexDefinition is the key here and its syntax is as follows:

<Index Version>$<Index Name>$<Index State>$<Index Rule>$<Index Type>$<Index Value State>$<AttributeName>

The following appendix explains each of the index fields above.

Appendix:

Index Version:

This field is reserved for future use and the value of this field is zero(0) always.

Index Name:

Specifies the user defined name of the index. If this filed is empty, then the name of the attribute automatically becomes the name of the index. Note that ‘$’ is a delimiter and hence this needs to be avoided in the name of the index.

Index State:

Specifies the state of the index. It can have the following values:

eDirectory supports the following values:

0 – Denotes the ‘suspended’ state. This means that this index is not used in queried and not updated.
1 – Denotes the ‘Bringing Online’ state. This means that the index is in the process of being created. It has two states, Bringing Online (low) and Bringing online (high).

  1. Bringing Online (low) indicates that the index creation process on the said attribute is pending.
  2. Bringing Online(high) indicates that the index creation is in progress.

2 – Denotes the ‘online’ state, which indicates that the index is up and working.
3 – Denotes the ‘Pending Creation’ state, which indicates that the index has been defined and is waiting for the background process to run.

The background process changes the state after the building begins. Note that when defining an index, this field should be set to 2 (online).

Index Rule:

The following can be the values of the ‘Index Rule’ field:

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 beginning 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.

Index Type:

Specifies who created the index. The following can be the values:

0 – User Defined
1 – Added on Attribute Creation
2 – Required for Operation
3 – System Index

When defining an index, this field has to be set to 0.

Index Value State:

Specifies the source of the index. 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

When defining an index, set this field needs to be 1.

Attribute Name:

Specifies the NDS name(NOT THE LDAP NAME) of the attribute to be indexed.

Final Note:

Yes. Indexing improves search performance. But we have to keep in mind that updating the (modified) indexes will also consume a good amount of time, especially if the database is huge.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Categories: Uncategorized

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

1 Comment

  1. By:brucetimberlake

    Thanks for this no-nonsense post regarding indexes. I especially like the discussion of LDIF files to manage indexes, as those files can be placed in version control and applied against many servers via script vs point-and-click across all the servers, etc.

    Things I learned: limber triggers the actual index creation (and I’m assuming any subsequent modification of an index via LDIF?).

    Things I noticed which need fixing: minor typo in the heading for the LDAP section – it also says “Managing Indexes through iManager” like the first section about iManager does.

Comment