class CommonUtils {

    static Map<String, Object> buildQuery(final Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
            final HashMultimap<String, Object> shouldFilter) {
        Map<String, Object> queryFilters = Maps.newHashMap();
        Map<String, Object> boolFilters = Maps.newHashMap();
        if (isNotNullOrEmpty(mustFilter)) {
            boolFilters.put(MUST, getFilter(mustFilter));
        }
        if (isNotNullOrEmpty(mustNotFilter)) {

            boolFilters.put(MUST_NOT, getFilter(mustNotFilter));
        }
        if (isNotNullOrEmpty(shouldFilter)) {
            boolFilters.put(SHOULD, getFilter(shouldFilter));
            boolFilters.put(MINIMUM_SHOULD_MATCH, 1);
        }
        queryFilters.put(BOOL, boolFilters);
        return queryFilters;
    }

}