public int encode(ByteBuffer buffer, boolean encodeQueryData) {
        if (encodeQueryData) {
            return MapEncoder.encodeMultiMap("rank", properties, buffer);
        }
        else {
            List<Object> sessionId = properties.get(GetDocSumsPacket.sessionIdKey);
            if (sessionId == null) return 0;
            return MapEncoder.encodeSingleValue("rank", GetDocSumsPacket.sessionIdKey, sessionId.get(0), buffer);
        }
    }
Encodes this in a binary internal representation and returns the number of property maps encoded (0 or 1)
container-search/src/main/java/com/yahoo/search/query/ranking/RankProperties.java