Term aggregation with No Compatible Fields in Kibana 5.4


#1

Hello,

On Data Table visualization I am receiving error "No Compatible Fields: The "sodhk2" index pattern does not contain any of the following field types: number, boolean, date, ip or string ".

I have following index pattern (mapping is created by curl xput message and assigned to Kibana on Browser with "Configure an index pattern" Wizard). Any help is appreciated:

~/scripts> curl -get http://localhost:9200/sodhk2?pretty=true
{
"sodhk2" : {
"aliases" : { },
"mappings" : {
"test" : {
"properties" : {
"BC" : {
"type" : "long"
},
"EOD1" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
..
..
"EOD1 msg sent" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"SOD-HK Sent to mdf Soll (GMT)" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"SODHK received HPS" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
}
},
"settings" : {
"index" : {
"creation_date" : "1494571443935",
"number_of_shards" : "5",
"number_of_replicas" : "1",
"uuid" : "YjPCLRJ3QymHApYg21hkYQ",
"version" : {
"created" : "5040099"
},
"provided_name" : "sodhk2"
}
}
}
}

I have also doc entries applied to kibana by curl xpost command:

:~/scripts> curl -XGET http://localhost:9200/sodhk2/_search?size=1
{"took":0,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":103,"max_score":1.0,"hits":[{"_index":"sodhk2","_type":"test","_id":"AVv7bYBw9B7sLSntUj3k","_score":1.0,"_source":
{
"BC" : 731,
"Market HK" : "2017-05-11 19:06:32",
"SODHK received HPS" : "2017-05-11 19:10:02",
"SOD-HK Sent to mdf Soll" : "04:28:00 ",
"SOD-HK Sent to mdf Soll (GMT)" : "21:58:00",
"SOD-HK Sent to mdf Ist" : "2017-05-11 19:28:01",
"SOD-HK Sent msg" : "1231",
"EOD1" : "2017-05-12 06:39:01",
"EOD1 msg sent" : "1189",
"EOD2" : "2017-05-11 12:58:00",
"EOD2 msg sent" : "1188",
"Hostname" : "mqzhlmpx07"
}


(Marius Dragomir) #2

What version of Kibana and ES are you using?
If it's >5.0 you need to change the mapping in order to reflect this changes: https://www.elastic.co/blog/strings-are-dead-long-live-strings
text type fields are analyzed so they are not going to be marked as aggregatable (which makes them available for visualizations in kibana). So you might need to change from text to keyword, it all depends on what you want/need to do with each field.


#3

Hi Marius

I am using version 5.4 for both Kibana and ES
I followed your hint but still not work also with integer (number) sample. I created new very simple structure wit curl put and assigned to new index named sodhk5. Below is a get curl command to verify ES entries. Please give me a hint ( I haven't applied data to new structure)

mpx@mqzhlmpx07:~> curl -get http://localhost:9200/sodhk5?pretty=true
{
"sodhk5" : {
"aliases" : { },
"mappings" : {
"sodhk2" : {
"properties" : {
"BC" : {
"type" : "integer"
},
"EOD1" : {
"type" : "keyword"
},
"EOD1 msg sent" : {
"type" : "keyword"
},
"EOD2" : {
"type" : "keyword"
},
"EOD2 msg sent" : {
"type" : "keyword"
},
"Hostname" : {
"type" : "keyword"
},
"Market HK" : {
"type" : "keyword"
},
"SOD-HK Sent msg" : {
"type" : "keyword"
},
"SOD-HK Sent to mdf Ist" : {
"type" : "keyword"
},
"SOD-HK Sent to mdf Soll" : {
"type" : "keyword"
},
"SOD-HK Sent to mdf Soll (GMT)" : {
"type" : "keyword"
},
"SODHK received HPS" : {
"type" : "keyword"
}
}
}
},
"settings" : {
"index" : {
"creation_date" : "1494769971280",
"number_of_shards" : "1",
"number_of_replicas" : "1",
"uuid" : "h3PnBo2RS3W5EL2aErZjiw",
"version" : {
"created" : "5040099"
},
"provided_name" : "sodhk5"
}
}
}
}


#4

I could help myself by using elasticsearch-py interface


(system) #5

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