@Override
    public Set<String> getSearchFields() throws UnsupportedOperationException
    {
        final AtomicLong supportSearch = new AtomicLong(getUserProviders().size());
        final Set<String> result = getUserProviders().parallelStream()
            .map(userProvider -> {
                try {
                    return userProvider.getSearchFields();
                } catch ( UnsupportedOperationException uoe ) {
                    supportSearch.decrementAndGet();
                    return new HashSet<String>();
                }
            })
            .flatMap(Collection::stream)
            .collect(Collectors.toSet());

        if (supportSearch.longValue() == 0)
        {
            throw new UnsupportedOperationException( "None of the backing providers support this operation." );
        }
        return result;
    }
Returns the combination of search fields supported by the backing providers. Note that the returned fields might
not be supported by every backing provider.

@throws UnsupportedOperationException If no search fields are returned, or when at least one of the providers throws UnsupportedOperationException when its #getSearchField() is invoked.
xmppserver/src/main/java/org/jivesoftware/openfire/user/UserMultiProvider.java