|Skip Navigation Links|
|Exit Print View|
|Oracle Directory Server Enterprise Edition Administration Guide 11g Release 1 (220.127.116.11.0)|
Browsing indexes are special indexes used only for search operations that request server-side sorting of results. Oracle Directory Server Enterprise Edition Reference explains how browsing indexes work in Directory Server.
Customized browsing indexes for sorting client search results must be defined manually. To create a browsing index, or virtual list view (VLV) index, use the following procedure. This section also includes procedures for adding or modifying browsing index entries and for regenerating browsing indexes.
For parts of this procedure, you can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help. Other parts of the procedure can only be done using the command line.
For instructions, see To Add or Modify Browsing Index Entries.
For instructions, see To Regenerate Browsing Indexes.
A browsing index is specific to a given search on a given base entry and its subtree. The browsing index configuration is defined in the database configuration of the suffix that contains the entry.
These attributes configure the base of the search, the scope of the search, and a filter for the search. These attributes use the vlvSearch object class.
This attribute specifies the name of the attribute or attributes that sort the index. This entry is a child of the first entry and uses the vlvIndex object class to specify which attributes to sort and in what order.
The following example uses the ldapmodify command to create the browsing index configuration entries:
$ ldapmodify -a -h host -p port -D cn=admin,cn=Administrators,cn=config -w - Enter bind password: dn: cn=people_browsing_index, cn=database-name, cn=ldbm database,cn=plugins,cn=config objectClass: top objectClass: vlvSearch cn: Browsing ou=People vlvBase: ou=People,dc=example,dc=com vlvScope: 1 vlvFilter: (objectclass=inetOrgPerson) dn: cn=Sort rev employeenumber, cn=people_browsing_index, cn=database-name,cn=ldbm database,cn=plugins,cn=config objectClass: top objectClass: vlvIndex cn: Sort rev employeenumber vlvSort: -employeenumber ^D
The vlvScope is one of the following:
0 for the base entry alone
1 for the immediate children of the base
2 for the entire subtree rooted at the base
The vlvFilter is the same LDAP filter that is used in the client search operations. Because all browsing index entries are located in the same place, you should use descriptive cn values to name your browsing indexes.
Each vlvSearch entry must have at least one vlvIndex entry. The vlvSort attribute is a list of attribute names that defines the attribute to sort on and the sorting order. The dash ( -) in front of an attribute name indicates reverse ordering. You can define more than one index for a search by defining several vlvIndex entries. With the previous example, you could add the following entry:
$ ldapmodify -a -h host -p port -D cn=admin,cn=Administrators,cn=config -w - dn: cn=Sort sn givenname uid, cn=people_browsing_index, cn=database-name,cn=ldbm database,cn=plugins,cn=config objectClass: top objectClass: vlvIndex cn: Sort sn givenname uid vlvSort: sn givenname uid ^D
Alternatively, if only one vlvIndex entry exists, remove both the vlvSearch entry and the vlvIndex entry.
$ dsadm reindex -l -t attr-index instance-path suffix-DN
The command scans the directory contents and creates a database file for the browsing index.
The following example generates the browsing index that you defined in the previous section:
$ dsadm reindex -l -b database-name -t Browsing /local/dsInst \ ou=People,dc=example,dc=com
For more information about the dsadm reindex command, see the dsadm(1M) man page.