public static SearchRequest newLdaptiveSearchRequest(final String baseDn,
                                                         final String filterQuery,
                                                         final List<String> params,
                                                         final String[] returnAttributes) {
        val request = new SearchRequest();
        request.setBaseDn(baseDn);
        request.setFilter(newLdaptiveSearchFilter(filterQuery, params));
        request.setReturnAttributes(returnAttributes);
        request.setSearchScope(SearchScope.SUBTREE);
        return request;
    }
New ldaptive search executor search executor.

@param baseDn           the base dn
@param filterQuery      the filter query
@param params           the params
@param returnAttributes the return attributes
@return the search executor
support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java