Kibana Filter aggregation: how to handle field names (and/or values) with spaces?

You should reindex the data without spaces in the field names, and make sure the closure_code field is mapped as "keyword".

Later versions of Kibana allow a custom field label, which can be the "human friendly" name. So there really is no need to have a space in the field name.