-
To create a filtered index, use the dsconfig tool.
The following command creates an equality index on the
companyDomain
attribute and maintains an index for the equality filter defined"(objectclass=company)"
.$ bin/dsconfig create-local-db-index --backend-name "userRoot" \ --index-name companyDomain --set maintain-equality-index-without-filter:true \ --set index-type:equality --set equality-index-filter:"(objectclass=company)"
-
After you have created the index, rebuild the indexes.
- Stop the Directory Server using bin/stop-server.
-
Run the rebuild-index tool.
$ bin/rebuild-index --baseDN dc=example,dc=com --index companyDomain
- Start the Directory Server using bin/start-server.