Why am i getting .keyword for my feilds in index pattern

Hi All,

I am new to kibana and i am trying to transfer my data from aws service to kibana.
Once I receive the data from AWS and create a index patter i can see two fields created for every 1 filed of my original data. For example my original data is having a field "activity" and in my discover tab I can see only the field "activity"but in my index patter I have "activity" and "activity.keyword" .

Why .keyword is created for my fields ? and what is the use of them and how to avoid them ?


It's because you did not define a proper mapping so elasticsearch creates a default one for you.

How should i do the proper mapping ? can you please advice ? I am new to kibana and I don't find any option for mapping when i create a index patter.

Below are the screen I am getting when i try to create the index pattern


34%20AM
57%20AM

The moment i hit the create button my index pattern is created. Please advice

Thanks in Advance!!
Venkatesh

It's not a Kibana question. This is something to solve on elasticsearch side.

Read https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-put-mapping.html or https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-create-index.html

Basically:

DELETE iotdemo101
PUT iotdemo101 
{
    "mappings" : {
        "_doc" : {
            "properties" : {
                "device" : { "type" : "text" }
            }
        }
    }
}
POST iotdemo101/_doc
{
  "device": "foo"
}

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