How to map fields with dynamic keys

Hey @warkolm, thank you for the reply. I tried to do it before, but with dynamic templates , I still have all the keys in mapping schema. For the dynamic template you suggested, after indexing my documents, I got it:

  GET my_index/_mappings

  {
  "my_index": {
    "mappings": {
      "my_type": {
        "dynamic_templates": [
          {
            "dynamic_keys": {
              "mapping": {
                "type": "float"
              },
              "match": "loc_*"
            }
          }
        ],
        "properties": {
          "loc_11": {
            "type": "float"
          },
          "loc_13": {
            "type": "float"
          },
          "loc_15": {
            "type": "float"
          },
          "loc_18": {
            "type": "float"
          },
          "loc_2": {
            "type": "float"
          },
          "loc_20": {
            "type": "float"
          },

I would like to avoid that because the number of dynamic keys I may generate in my real scenario is very large.