opendsindexes
Table of Contents
OpenDS LDAP Indexes
Summary: How to manage indexes in OpenDS.
Date: Around 2012
Refactor: 8 March 2025: Checked links and formatting.
Preparation
To be able to create indexes on openDS LDAP you need X11 access to the application. To check how to set this up check CygWin - X on Windows and ssh_x11_forwarding_and_su.
Create Indexes
Indexes are created using the control-panel which is part of the installation.
Start the control-panel like this:
./opt/OpenDS-2.2.0/bin/control-panel
Go to “INDEXES” → “New Index”
Create these indexes:
- Create an index on “AccountID” as index type “Equality” and “Presence”
- Create an index on “uid” with as index type “Equality” and “Presence”
- Create an index on attribute “objectClass” as index type “Equality”
- Create an index on attribute “aci” as index type “Presence”
- Create a VLV index on whole subtree with filter:
(&(|(objectClass=groupOfNames)(objectClass=groupOfUniqueNames)(objectClass=groupOfEntries))(!(objectClass=ds-virtual-static-group)))
- Sort order: uid (ascending) and AccountID (ascending)
Note: whenever you save an index you'll get a message stating that you should rebuild the index. This will take the backend offline, so click No. We'll rebuild the index in the next step.
When done, exit the control-panel.
Rebuild Index
To rebuild the index on the command line issue these commands:
./stop-ds ./rebuild-index -b o=company.local -rebuildAll ./start-ds
Check Index
When the indexes have been rebuild results should show up within 1 second:
root@ldapbox:/opt/OpenDS-2.2.0/bin>/opt/IBM/ldap/V6.2/bin/ldapsearch -h localhost -p 389 -b o=company.local -D cn=manager -w xxxxxxxx uid=000018615777 uid=000018615777,ou=customers,o=company.local userClass=100 LastLogin=1298231054722 mail=sjoerd_warmetal.nl sn=Hooft cn=S.S. uid=000018615777 objectClass=top objectClass=Customer objectClass=organizationalPerson objectClass=inetOrgPerson objectClass=person
opendsindexes.txt · Last modified: by 127.0.0.1