Fields not displaying in visualize

The fields are not displaying in visualize under Terms or Significant Terms but are available in discover page. What should i change to make fields available in Visualize:

I have tried with keywords and text

Mapping:

PUT /vcmts-new
{
  "mappings": {
    "build": {
      "properties": {
        "rel_ver": {
          "type": "text"
        },
        "build_time": {
          "type": "date"
        },
        "rel_status": {
          "type": "text"
        },
        "rel_tags": {
          "type": "text"
        },
        "job_num": {
          "type": "integer"
        }
      }
    }
  }
}

Document:

POST /vcmts-new/build
{
  "rel_ver": "2.6.7.1-1-auto14",
  "build_time": "2018-05-21",
  "rel_status": "fail",
  "rel_tags": "PI09",
  "job_num": 22
}

visualize-kibana

You need to make them the type keyword if you want them to be visualized or (but most likely not what you want) turn on the field data for that fields.

The difference summed up:

Type: text is analyzed and splitted up by default, i.e. if you put in something like "Hello World" you will end up with terms for "hello" and "world". Meaning if you do a terms aggregation (and enable field data) on that you would retrieve one result "Hello" and one "World". That usually only makes sense for fields that have "plain text" like comments or tweets or some text people wrote.

Type: keyword mean index the string as it is. Don't split it up, create one entry per exact value that existed. Which is what you most often want for that type of keywords, like your status field or versions.
If you switch the type in your mapping to keyword it will also be automatically aggregatable and thus appear in the list. I think that is the solution you actually want in your case.

I also tried to explain a bit about that indexing in this blog post. That might help clarifying some of the analyzing ideas.

Cheers,
Tim

1 Like

Did you refresh the Index Patterns after you add or change the fields? Just to be sure.

4 Likes

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