<commit_before>package es

import (
	"fmt"
)

type Facet struct {
	Type           string      `json:"_type,omitempty"`
	Missing        int         `json:"missing,omitempty"`
	Total          int         `json:"total,omitempty"`
	Other          int         `json:"other,omitempty"`
	Terms          *FacetTerms `json:"terms,omitempty"`
	*Entries       `json:"entries,omitempty"`
	*DateHistogram `json:"date_histogram,omitempty"`
	Statistical    *StatisticalFacet
}
<commit_msg>omit empty statistical facets<commit_after>package es

import (
	"fmt"
)

type Facet struct {
	Type           string      `json:"_type,omitempty"`
	Missing        int         `json:"missing,omitempty"`
	Total          int         `json:"total,omitempty"`
	Other          int         `json:"other,omitempty"`
	Terms          *FacetTerms `json:"terms,omitempty"`
	*Entries       `json:"entries,omitempty"`
	*DateHistogram `json:"date_histogram,omitempty"`
	Statistical    *StatisticalFacet `json:"statistical,omitempty"`
}

{'fraction_non_alphanumeric': 0.11658291457286432, 'fraction_numerical': 0.0, 'mean_word_length': 2.9058823529411764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2697512', 'n_tokens_mistral': 299, 'n_tokens_neox': 285, 'n_words': 60}