1. A method comprising: receiving, at a lightweight directory access protocol (LDAP) server, a query to retrieve data from a LDAP repository communicably coupled to the LDAP server; reorganizing, by the LDAP server, search terms in the query based on a uniqueness value of corresponding LDAP indexes to generate a modified query, wherein the uniqueness value of each LDAP index is based on a ratio of targets to keys in the corresponding LDAP index; executing, by the LDAP server, the modified query; generating a candidate list of entries based on the search terms; and detecting a threshold number of entries in the candidate list.