private static void extractQueryValues(String query, String prefix, BiConsumer<String, String> registerTerm) {
        int rangeIndex = query.indexOf(prefix);
        if (rangeIndex != -1) {
            // Adding 2 to skip '={'
            int startIndex = rangeIndex + prefix.length() + 2;
            // '%7D' represents the end of the predicate string.
            int endIndex = query.indexOf("}", startIndex);
            String rangeString = query.substring(startIndex, endIndex);
            List<Feature> features = new ArrayList<>();
            String[] keyValuePairs = rangeString.split(",");

            for (String keyValuePair : keyValuePairs) {
                String[] keyAndValue = keyValuePair.split(":");
                // If not colon is found, the string is part of the previous value.
                if (keyAndValue.length == 1) {
                    Feature feature = features.get(features.size() - 1);
                    feature.value += ("," + keyValuePair);
                } else {
                    features.add(new Feature(keyAndValue[0], keyAndValue[1]));
                }
            }
            features.stream().forEach(f -> registerTerm.accept(f.key, f.value));
        }
    }
Parses a query formatted using the deprecated boolean query format (query properties).
predicate-search/src/main/java/com/yahoo/search/predicate/utils/VespaQueryParser.java