private static String createYqlFormatSubqueryMapString(Map<Long, Set<Feature>> subqueriesForString, boolean isSingleQuery) {
        return subqueriesForString.entrySet().stream()
                .map(e -> {
                    Stream<String> features = e.getValue().stream().map(Feature::asYqlString);
                    if (isSingleQuery) {
                        return features.collect(joining(", "));
                    } else {
                        // Note: Cannot use method reference as both method toString(int) and method toString() match.
                        String values = features.collect(joining(", ", "{", "}"));
                        return String.format("\"0x%s\":%s", Long.toHexString(e.getKey()), values);
                    }
                })
                .collect(joining(", ", "{", "}"));
    }
Converts a targeting query (the format provided by targeting team) into a file of Vespa queries formatted as URLs.

The format is the following:
- Each line represents one bulk query (upto 64 subqueries)
- Each bulk query has a set of subqueries separated by ";"
- Each subquery is of the format: attrName\tattrValue\tsubqueryIndex\tisRangeTerm;
- Some attributes have no value.
- Value may contain ";"

@author bjorncs
predicate-search/src/main/java/com/yahoo/search/predicate/utils/TargetingQueryFileConverter.java