Este contenido no está disponible en el idioma seleccionado.
13.3. Creating New Indexes to Existing Databases
Learn how to initiate indexing operations on Directory Server. You must create indexes manually because Directory Server does not automatically index databases.
Important
Before you regenerate the index, searches proceed but can return incorrect or inconsistent results.
13.3.1. Creating an Index While the Instance is Running Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
13.3.1.1. Creating an Index Using the dsconf backend index reindex Command Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
To recreate the index of a database while the instance is running:
dsconf -D "cn=Directory Manager" ldap://server.example.com backend index reindex database_name
# dsconf -D "cn=Directory Manager" ldap://server.example.com backend index reindex database_name
13.3.1.2. Creating an Index Using a cn=tasks Entry Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
The
cn=tasks,cn=config entry in the Directory Server configuration is a container entry for temporary entries the server uses to manage tasks. To initiate an index operation, create a task in the cn=index,cn=tasks,cn=config entry.
Use the
ldapadd utility to add a new index task. For example, to add a task that creates the presence index for the cn attribute in the userRoot database:
When the task is completed, the entry is removed from the directory configuration.
For further details, about the
cn=index,cn=tasks,cn=config entry, see the cn=index section in the Red Hat Directory Server Configuration, Command, and File Reference.
13.3.2. Creating an Index While the Instance Offline Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
After creating an indexing entry or adding additional index types to an existing indexing entry, use the
dsconf db2index command:
- Shut down the instance:
dsctl instance_name stop
# dsctl instance_name stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Recreate the index:
- For all indexes in the database, run:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For specific attribute indexes, run:
dsctl instance_name db2index userRoot --attr aci cn givenname
# dsctl instance_name db2index userRoot --attr aci cn givennameCopy to Clipboard Copied! Toggle word wrap Toggle overflow The following command recreates indexes foraci,cn, andgivennameattributes. Note that if no database is specified, the command recreates indexes for all attributes.
- Start the instance:
dsctl instance_name start
# dsctl instance_name startCopy to Clipboard Copied! Toggle word wrap Toggle overflow