public Object getField(Hit hit, String key) {
        if ("[relevance]".equals(key)) return hit.getRelevance();
        if ("[rank]".equals(key)) return hit.getRelevance();
        if ("[source]".equals(key)) return hit.getSource();
        // missing: "[docid]"
        int firstDot = key.indexOf('.');
        if (firstDot > 0 && hit.getField(key) == null) {
            String keyPrefix = key.substring(0, firstDot);
            String keySuffix = key.substring(firstDot + 1);
            Object a = hit.getField(keyPrefix);
            Object b = getSubField(a, keySuffix);
            return b;
        }
        return hit.getField(key);
    }
Compares hits based on a sorting specification and values
stored in hit fields.0
<p>
When one of the hits has the requested property and the other
has not, the hit containing the property precedes the one
that does not.
<p>
There is no locale based sorting here, as the backend does
not do that either.

@return -1, 0, 1 if first should be sorted before, equal to or after second
container-search/src/main/java/com/yahoo/search/result/FieldComparator.java