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