public String getGroupSearchFilter() {
        StringBuilder groupFilter = new StringBuilder();
        if (groupSearchFilter == null) {
            groupFilter.append('(').append(groupNameField).append("={0})");
        }
        else {
            groupFilter.append("(&(").append(groupNameField).append("={0})");
            groupFilter.append(groupSearchFilter).append(')');
        }
        return groupFilter.toString();
    }
Returns the filter used for searching the directory for groups, which includes
the default filter plus any custom-defined search filter.

@return the search filter when searching for groups.
xmppserver/src/main/java/org/jivesoftware/openfire/ldap/LdapManager.java