private JsonGenerator generator() {
            if (generator == null)
                throw new UnsupportedOperationException("Generator required but not assigned. " +
                                                        "All accept() methods must be overridden when sub-classing FieldConsumer");
            return generator;
        }
Call after all fields in a hit to close the "fields" field of the JSON object
container-search/src/main/java/com/yahoo/search/rendering/JsonRenderer.java