1. A method comprising: receiving a request, at a lightweight directory access protocol (LDAP) directory server, to retrieve data from a LDAP repository communicably coupled to the LDAP server, wherein the request is in the form of a filter that is a logical expression including search terms related to the data; evaluating, by the LDAP server, the filter in terms of statistical data being tracked by the LDAP server; adding, by the LDAP server, statistical data related to the filter to a set of filter tracking data maintained by the LDAP server for one or more filters, wherein the filter tracking data includes at least one of an access frequency of each filter, an evaluation time of each filter, a time that a request for each filter is received, system load when the request for each filter is received, and a number of entries processed for each filter; generating, by the LDAP server, one or more LDAP indices for each of the one or more filters; selecting, by the LDAP server, a defined number of the one or more LDAP indices with a highest dynamic ranking to maintain in the LDAP repository, wherein the dynamic ranking is determined from the statistical data determined for the filter associated with each LDAP index; and deleting, by the LDAP server, a remaining one or more LDAP indices that are not selected for maintenance; wherein the filter tracking data is updated each time the LDAP server receives another request, and the selecting and deleting the remaining one or more LDAP indices is repeated using updated dynamic rankings based on the updated filter tracking data on an on-going basis.