public static MapContext fromString(String contextString) {
        MapContext mapContext = new MapContext();
        for (String keyValueString : contextString.split(",")) {
            String[] strings = keyValueString.trim().split(":");
            mapContext.put(strings[0].trim(), Value.parse(strings[1].trim()));
        }
        return mapContext;
    }
A convenience constructor which returns a map context from a string on the form
<code>name1:value1, name2:value2 ...</code>.
Extra spaces are allowed anywhere. Any other deviation from the syntax causes an exception to be thrown.
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/MapContext.java