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 import-ldif tool, the index is automatically rebuilt. If you add an index and then add the data using a different method, you must rebuild the index using the rebuild-index tool.

  1. To modify an index, run dsconfig with the set-local-db-index-prop option and the --index-name and --backend-name properties.

    This example updates the prime-index property, which loads the index at startup. To access this command, use the --advanced option.

    $ bin/dsconfig set-local-db-index-prop --index-name uid \ 
      --backend-name userRoot --set prime-index:true
  2. To view the index and verify the change, run dsconfig with the get-local-db-index-prop option.
    $ bin/dsconfig get-local-db-index-prop --index-name uid \ 
      --backend-name userRoot
  3. Stop the server.

    Although you can rebuild an index with the server online, it is not recommended.

    $ bin/stop-server
  4. To rebuild the index, run the rebuild-index tool.
    $ bin/rebuild-index --baseDN dc=example,dc=com --index uid
  5. Restart the server.
    $ bin/start-server