Kibana not showing indexed fields

I've configured an index template based on the logstash one:

{
  "order": 3,
  "template": "nginx-*",
  "settings": {
    "index.refresh_interval": "5s"
  },
  "mappings": {
    "_default_": {
      "dynamic_templates": [
        {
          "message_field": {
            "mapping": {
              "index": "analyzed",
              "omit_norms": true,
              "type": "string"
            },
            "match_mapping_type": "string",
            "match": "message"
          }
        },
        {
          "string_fields": {
            "mapping": {
              "index": "analyzed",
              "omit_norms": true,
              "type": "string",
              "fields": {
                "raw": {
                  "ignore_above": 256,
                  "index": "not_analyzed",
                  "type": "string"
                }
              }
            },
            "match_mapping_type": "string",
            "match": "*"
          }
        }
      ],
      "_all": {
        "omit_norms": true,
        "enabled": true
      },
      "properties": {
        "geoip": {
          "dynamic": true,
          "type": "object",
          "properties": {
            "location": {
              "type": "geo_point"
            }
          }
        },
        "@version": {
          "index": "not_analyzed",
          "type": "string"
        }
      }
    }
  },
  "aliases": {}
}

But the fields detected in Kibana shows as not indexed except for the .raw fields:

And if I try to visualize based on a number aggregation it shows

I tried everything, refreshing fields, removing the index template, removing index definition in Kibana and recreating it, changing index names, tweeking mappings, and lot more things.

I'm really puzzled with this.

I believe your number fields have to be indexed to show up in the dropdown under the Range aggregation.