public static SearchOperation newLdaptiveSearchOperation(final String baseDn, final String filterQuery,
                                                             final List<String> params,
                                                             final List<String> returnAttributes) {
        val operation = new SearchOperation();
        val request = newLdaptiveSearchRequest(baseDn, filterQuery, params, returnAttributes.toArray(ArrayUtils.EMPTY_STRING_ARRAY));
        operation.setRequest(request);
        operation.setTemplate(newLdaptiveSearchFilter(filterQuery, params));
        return operation;
    }
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