Managing local DB indexes
To modify the local database (DB) indexes to meet your system’s requirements, use the dsconfig tool. If you are using the dsconfig tool in interactive command-line mode, access the Local DB Index menu from the Basic object menu.
Viewing the list of local DB indexes
Steps
-
To view the default list of indexes, run
dsconfigwith thelist-local-db-indexesoption.Example:
$ bin/dsconfig list-local-db-indexes --backend-name userRootResult:
Local DB Index : Type : index-type -------------------:---------:-------------------- aci : generic : presence cn : generic : equality, substring ds-entry-unique-id : generic : equality givenName : generic : equality, substring mail : generic : equality member : generic : equality objectClass : generic : equality sn : generic : equality, substring telephoneNumber : generic : equality uid : generic : equality uniqueMember : generic : equality
Viewing a property for all local DB indexes
Steps
-
To view a property assigned set for all local DB indexes, run
dsconfigwith the--propertyoption.Repeat the option for each property that you want to list.
Example:
In this example, the
prime-indexproperty specifies if the backend is configured to prime the index at startup.$ bin/dsconfig list-local-db-indexes --property index-entry-limit \ --property prime-index --backend-name userRoot
Viewing the configuration parameters for local DB index
Steps
-
To view the configuration setting of a local DB index, run
dsconfigwith theget-local-db-index-propoption and the--index-nameand--backend-nameproperties.To view the advanced properties, add the
--advancedoption to your command.Example:
$ bin/dsconfig get-local-db-index-prop --index-name aci \ --backend-name userRoot
Modifying the configuration of a local DB index
About this task
To modify an index, run the dsconfig tool. Any modification or addition of an index requires rebuilding the indexes. In general, an index only needs to be built once after it has been added to the configuration.
|
If you add an index and then import the data using the |
Steps
-
To modify an index, run
dsconfigwith theset-local-db-index-propoption and the--index-nameand--backend-nameproperties.Example:
This example updates the
prime-indexproperty, which loads the index at startup. To access this command, use the--advancedoption.$ bin/dsconfig set-local-db-index-prop --index-name uid \ --backend-name userRoot --set prime-index:true -
To view the index and verify the change, run
dsconfigwith theget-local-db-index-propoption.Example:
$ bin/dsconfig get-local-db-index-prop --index-name uid \ --backend-name userRoot -
Stop the server.
Although you can rebuild an index with the server online, it is not recommended.
Example:
$ bin/stop-server -
To rebuild the index, run the
rebuild-indextool.Example:
$ bin/rebuild-index --baseDN dc=example,dc=com --index uid -
Restart the server.
Example:
$ bin/start-server
Creating a new local DB index
Steps
-
To create a new local DB index, run
dsconfigwith the--create-local-db-indexoption and the--index-name,--backend-name, and--set index-type:<value> options.Example:
$ bin/dsconfig create-local-db-index \ --index-name roomNumber --backend-name userRoot \ --set index-type:equality -
To view the index, run
dsconfigwith theget-local-db-index-propoption.Example:
$ bin/dsconfig get-local-db-index-prop \ --index-name roomNumber --backend-name userRoot -
Stop the PingDirectory server.
Although you can rebuild an index with the server online, it is not recommended.
Example:
$ bin/stop-server -
To rebuild the index, run the
rebuild-indextool.Example:
$ bin/rebuild-index --baseDN dc=example,dc=com --index roomNumber -
Restart the PingDirectory server.
Example:
$ bin/start-server
Deleting a local DB index
About this task
Check that no plugin applications are using the index before deleting it.
|
When the index is deleted, the corresponding index database is also deleted. The disk space is reclaimed after the cleaner threads begin. |
Steps
-
To remove an index from the database, run
dsconfigwith thedelete-local-db-indexoption.Example:
$ bin/dsconfig delete-local-db-index \ --index-name roomNumber --backend-name userRoot