code: public NamingEnumeration<SearchResult> search(String name, String filter, int scope, String[] attrIds, int countLimit,
                                                    int timeLimit) throws WIMException {
          SearchControls controls = new SearchControls(scope, countLimit, timeLimit, attrIds, false, false);
          return checkSearchCache(name, filter, null, controls);
      }
docs: Searches in the named context or object for entries that satisfy the given search filter.
  Performs the search as specified by the search controls.
  
  <p/>Will first query the search cache. If there is a cache miss, the search will be
  sent to the LDAP server.
  
  @param name The name of the context or object to search
  @param filter the filter expression to use for the search. May not be null.
  @param scope The search scope. One of: {@link SearchControls#OBJECT_SCOPE},
  {@link SearchControls#ONELEVEL_SCOPE}, {@link SearchControls#SUBTREE_SCOPE}.
  @param attrIds The identifiers of the attributes to return along with the entry.
  If null, return all attributes. If empty return no attributes.
  @param countLimit The maximum number of entries to return. If 0, return all entries that satisfy filter.
  @param timeLimit The number of milliseconds to wait before returning. If 0, wait indefinitely.
  @return The {@link NamingEnumeration} containing the search results.
  @throws WIMException If the search failed with an error.