Numerical metric field not visible in drop-down during aggregation

Hi,

I am creating data with these 3 fields:
"field" : "xxx",
"post_date" : "2017-07-26T12:45:00",
"status" : 3

Later when I am creating a heatmap visualization and selecting aggregation for a metric, I see the post_date field but not the status field.
Is there anything to be done so that status field is also included in the list?

Mapping:

{
  "testindex" : {
    "mappings" : {
      "summary" : {
        "properties" : {
          "field" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "post_date" : {
            "type" : "date"
          },
          "status" : {
            "type" : "long"
          }
        }
      }
    }
  }
}

Complete data: (16 entries)

{
  "took" : 0,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0
  },
  "hits" : {
    "total" : 16,
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "testindex",
        "_type" : "summary",
        "_id" : "AV19qXXGCfr0qc2dUu3g",
        "_score" : 1.0,
        "_source" : {
          "field" : "lte",
          "post_date" : "2017-07-26T12:30:00",
          "status" : 2
        }
      },
      {
        "_index" : "testindex",
        "_type" : "summary",
        "_id" : "AV19qFVwCfr0qc2dUurr",
        "_score" : 1.0,
        "_source" : {
          "field" : "network",
          "post_date" : "2017-07-26T12:00:00",
          "status" : 0
        }
      },
      {
        "_index" : "testindex",
        "_type" : "summary",
        "_id" : "AV19qFXDCfr0qc2dUurs",
        "_score" : 1.0,
        "_source" : {
          "field" : "lte",
          "post_date" : "2017-07-26T12:00:00",
          "status" : 0
        }
      },
      {
        "_index" : "testindex",
        "_type" : "summary",
        "_id" : "AV19qNk5Cfr0qc2dUuvU",
        "_score" : 1.0,
        "_source" : {
          "field" : "cpu",
          "post_date" : "2017-07-26T12:15:00",
          "status" : 1
        }
      },
      {
        "_index" : "testindex",
        "_type" : "summary",
        "_id" : "AV19qNn4Cfr0qc2dUuvW",
        "_score" : 1.0,
        "_source" : {
          "field" : "network",
          "post_date" : "2017-07-26T12:15:00",
          "status" : 1
        }
      },
      {
        "_index" : "testindex",
        "_type" : "summary",
        "_id" : "AV19qNo5Cfr0qc2dUuvX",
        "_score" : 1.0,
        "_source" : {
          "field" : "lte",
          "post_date" : "2017-07-26T12:15:00",
          "status" : 1
        }
      },
      {
        "_index" : "testindex",
        "_type" : "summary",
        "_id" : "AV19qecbCfr0qc2dUu6Q",
        "_score" : 1.0,
        "_source" : {
          "field" : "memory",
          "post_date" : "2017-07-26T12:45:00",
          "status" : 3
        }
      },
      {
        "_index" : "testindex",
        "_type" : "summary",
        "_id" : "AV19qFR7Cfr0qc2dUurp",
        "_score" : 1.0,
        "_source" : {
          "field" : "cpu",
          "post_date" : "2017-07-26T12:00:00",
          "status" : 0
        }
      },
      {
        "_index" : "testindex",
        "_type" : "summary",
        "_id" : "AV19qXWWCfr0qc2dUu3f",
        "_score" : 1.0,
        "_source" : {
          "field" : "network",
          "post_date" : "2017-07-26T12:30:00",
          "status" : 2
        }
      },
      {
        "_index" : "testindex",
        "_type" : "summary",
        "_id" : "AV19qebSCfr0qc2dUu6P",
        "_score" : 1.0,
        "_source" : {
          "field" : "cpu",
          "post_date" : "2017-07-26T12:45:00",
          "status" : 3
        }
      }
    ]
  }
}

Found the problem. Inside the index the type was string (previously it was added as string). I had deleted the index through console but looks like that's not enough. After I deleted the index from Kibana and re-created it the field was created as number and now I can see the field in the drop-down.

-Regards
Nikhil

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.