HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

For more information on how to change the VLV search information or the access control rules that
are set by default for VLV searches, see Adding a browsing index entry” (page 458) and “Setting
access control for VLV information” (page 460).
11.2.5 Creating browsing indexes from the command line
Creating a browsing index or virtual list view (VLV) index from the command line has these steps:
1. Using ldapmodify to add new browsing index entries or edit existing browsing index entries.
See Adding a browsing index entry” (page 458).
2. Running the vlvindex script to generate the new set of browsing indexes to be maintained
by the server. See “Running the vlvindex script” (page 459).
Alternatively, launch an appropriate task under cn=tasks, cn=config (“Using a cn=tasks
entry to create a browsing index” (page 460)).
3. Ensuring that access control on VLV index information is set appropriately. See “Setting access
control for VLV information” (page 460).
11.2.5.1 Adding a browsing index entry
The type of browsing index entry to create depends on the type of ldapsearch attribute sorting
to accelerate. It is important to take the following into account:
The scope of the search (base, one, sub)
The base of the search (the entry to use as a starting point for the search)
The attributes to sort
The filter of the search
For more information on specifying filters for searches, see “Finding Directory Entries” (page
555).
The LDBM database to which the entry that forms the base of the search belongs. You can
only create browsing indexes in LDBM databases.
There is more information on ldapsearch options in the HP-UX Directory Server configuration,
command, and file reference.
For example, create a browsing index to accelerate an ldapsearch on the entry
ou=People,dc=example,dc=com held in the Example1 database with the following attributes:
The search base is ou=People,dc=example,dc=com
The search filter is (|(objectclass=*)(objectclass=ldapsubentry))
The scope is one
The sorting order for the returned attributes is cn, givenName, o, ou, and sn
1. Run ldapmodify.
ldapmodify -a -D "cn=directory manager" -w secret -p 389 -h server.example.com
The ldapmodify utility binds to the server and prepares it to add an entry to the configuration
file.
2. Add an entry that specifies the base, scope, and filter of the browsing index:
dn: cn=MCC ou=People dc=example dc=com, cn=userRoot, cn=ldbm database, cn=plugins, cn=config
objectClass: top
objectClass: vlvSearch
cn: MCC ou=People dc=example dc=com
vlvBase: ou=People, dc=example,dc=com
vlvScope: 1
vlvFilter: (|(objectclass=*)(objectclass=ldapsubentry))
The cn contains the browsing index identifier, which specifies the entry on which to create
the browsing index; in this example, the ou=People,dc=example,dc=com entry. HP
recommends using the dn of the entry for the browsing index identifier, which is the
458 Managing Indexes