1. A method of searching a directory organized as a naming hierarchy having a plurality of entries each represented by a unique identifier, comprising the steps of: generating a relational table associating unique identifier pairs in the naming hierarchy having a given hierarchical relationship; in response to a search query having a given filter criteria and search scope, returning a list of entries that satisfy the given filter criteria; and using the relational table to filter out entries in the list according to the given search scope.