1. Use the dsconfig tool to create a filtered index. The following command creates an equality index on the companyDomain attribute and maintains an index for the equality filter defined "(objectclass=company)". After you have created the index, you must rebuild the indexes.
    $ 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)"
  2. Stop the Directory Server using bin/stop-server.
  3. Run the rebuild-index tool.
    $ bin/rebuild-index --baseDN dc=example,dc=com --index companyDomain
  4. Start the Directory Server using bin/start-server.