2.6 ndsindex

The ndsindex utility creates, lists, suspends, resumes, or deletes indexes. It has the following syntax:

    ndsindex [command] [options] [index]
 

For additional information on eDirectory indexes see Indexes in the eDirectory Technical Overview.

NOTE:On a NetWare server, the utility is called nindex.

HINT:Output from the ldap utilities is sent to stdout. If the utility exits before you can view the output, redirect the output to a file, for example, ldapadd [options] > out.txt.

[Command]

Replace [command] with one of the following index operations:

Command

Description

list

Lists the specified index(es).

add

Adds the specified index(es).

delete

Deletes the specified index(es).

suspend

Suspends the specified index(es) (Suspends the index to an off-line state).

resume

Resumes the specified index(es) (resumes the index from an off-line state).

[Options]

Replace [options] with one or more of the following options:

Options

Description

-D <binddn>

Specifies the dn to use in binding to the LDAP server. The dn should be a string-represented dn as defined in RFC 1779.

-e <file>

Specifies the certificate file to use with an SSL bind.

-h <host>

Specifies an alternate host on which the LDAP server is running.

-l <limit>

Specifies the connection timeout (in seconds).

-s

-Specifies the eDirectory Server DN.

-p <port>

Specifies an alternate TCP port where the LDAP server is listening.

-w <passwd>

Specifies the password to use for simple authentication.

-W

Prompts the user for the password for simple authentication. This is used instead of specifying the password on the command line

-Z

Starts TLS before binding to perform the operation. If an error occurs during the Start TLS operation the error is ignored and the operation continues. It is recommended that the -ZZ option be used in place of this option to cause the operation to abort if an error occurs.

If a port is specified with this with this option, it must accept clear text connections.

To verify the server identity, this option should be used in conjunction with the -e option to specify a server certificate file to validate the server trusted root certificate when TLS is started. If the -e option is not specified, any certificate from the server will be accepted.

-ZZ

Starts TLS before binding to perform the operation. If an error occurs during the Start TLS operation the operation is aborted.

If a port is specified with this with this option, it must accept clear text connections.

To verify server identity, this option should be used in conjunction with the -e option to specify a server certificate file to validate the server trusted root certificate when TLS is started. If the -e option is not specified, any certificate from the server is accepted.

[Index]

For all index operations except add, replace [index] with the name of one or more indexes separated by a space.

For add index operations, replace [index] with one or more index definitions separated by a space, in the following format:

 indexname;atrributename;matchingrule
 

Index Definition Element

Description

indexname

Specifies the name for the index.

attributename

Specifies the attribute to be indexed.

matchingrule

Specifies the index matching rule. Can be one of the following values:

  • PRESENCE: Presence matching optimizes queries that involve checking only for the presence of the specified attribute.

  • VALUE: Value matching optimizes queries that involve matching the entire attribute value or the first part of the attribute value.

  • SUBSTRING: Substring matching optimizes queries that involve matching a few characters or a substring of the attribute value. These indexes are the most costly to maintain, but provide the most flexibility.

To create a presence matching index for the cn attribute, [index] is replaced with the following:

Examples

 ndsindex add [options] common_name;cn;PRESENCE
 

To suspend this index, specify the following:

 ndsindex suspend [options] common_name
 

To resume this index, specify the following:

 ndsindex resume [options] common_name
 

To delete this index, specify the following:

 ndsindex delete [options] common_name