Kibana elasticsearch query question

Hi All,

I've been trying to graph data obtains from a "SHOW STATUS" mysql query.
When attempting to graph "Threads_connected" using Kibana is received the
following error...

Oops! ClassCastException[org.elasticsearch.index.fielddata.plain.PagedBytesIndexFieldData
cannot be cast to org.elasticsearch.index.fielddata.IndexNumericFieldData]

I checked my mappings and the "Value" field has been added to elasticsearch
as a string even though it only ever contains integer counts. I don;t
really want to re-dump my data and change mappings so I've managed to fix
the query using dynamic scripting like so...

curl -XGET 'http://hostname:9200/_all/_search?pretty' -d '{
"facets": {
"0": {
"date_histogram": {
"key_field": "@timestamp",
"value": "doc['Value'].Intvalue",
"interval": "5m"
"global": true,
"facet_filter": {
"fquery": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "source:mysql_status AND
"filter": {
"bool": {
"must": [
"range": {
"@timestamp": {
"from": 1411520355984,
"to": 1411563555984
"size": 0

I have simply changed..

"value": "Value",


"value": "doc['Value'].Intvalue",

This query returns what I want but I am unable to get this into Kibana
without it throwing some kind of error. So my question would be... how do I
get my historgram to use data from the above query?


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit