public void clearAndReserve(int count) {
        map = new MapFieldValue<>(new MapDataType(getDataType().getNestedType(), DataType.INT), count);
    }
Reserve space for this amount of keys in order to avoid resizing
document/src/main/java/com/yahoo/document/datatypes/WeightedSet.java