PingDirectory

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 dsconfig with the list-local-db-indexes option.

    Example:

    $ bin/dsconfig list-local-db-indexes --backend-name userRoot

    Result:

    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 dsconfig with the --property option.

    Repeat the option for each property that you want to list.

    Example:

    In this example, the prime-index property 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 dsconfig with the get-local-db-index-prop option and the --index-name and --backend-name properties.

    To view the advanced properties, add the --advanced option 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 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.

Steps

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

    Example:

    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.

    Example:

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

    Example:

    $ bin/stop-server
  4. To rebuild the index, run the rebuild-index tool.

    Example:

    $ bin/rebuild-index --baseDN dc=example,dc=com --index uid
  5. Restart the server.

    Example:

    $ bin/start-server

Creating a new local DB index

Steps

  1. To create a new local DB index, run dsconfig with the --create-local-db-index option 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
  2. To view the index, run dsconfig with the get-local-db-index-prop option.

    Example:

    $ bin/dsconfig get-local-db-index-prop \
      --index-name roomNumber --backend-name userRoot
  3. Stop the PingDirectory server.

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

    Example:

    $ bin/stop-server
  4. To rebuild the index, run the rebuild-index tool.

    Example:

    $ bin/rebuild-index --baseDN dc=example,dc=com --index roomNumber
  5. 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 dsconfig with the delete-local-db-index option.

    Example:

    $ bin/dsconfig delete-local-db-index \
      --index-name roomNumber --backend-name userRoot