static Map<String, Set<String>> getMissingFields(final SearchParameters parameters) {
        final Map<String, Set<String>> result = new HashMap<>();

        if (parameters.getQ() == null || parameters.getQ().isEmpty()) {
            final Set<String> dependants = new HashSet<>();
            if (parameters.isSinaddr() != null) {
                dependants.add(VAR_SINADDRESS);
            }
            if (parameters.isSinname() != null) {
                dependants.add(VAR_SINNAME);
            }
            if (parameters.isSindescription() != null) {
                dependants.add(VAR_SINDESCRIPTION);
            }
            if (!dependants.isEmpty()) {
                result.put(VAR_Q, dependants);
            }
        }
        return result;
    }
Checks if the room may be included in search results. This is almost
identical to {@link MultiUserChatServiceImpl#canDiscoverRoom(MUCRoom, org.xmpp.packet.JID)},
but that method is private and cannot be re-used here.

@param room The room to check
@return ''true'' if the room may be included in search results, ''false''
otherwise.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQExtendedChannelSearchHandler.java