Kibana does not recognize indexed fields


(Yitzchak Lockerman) #1

I am trying to use Kibana 4.5.4 with elasticsearch 2.4.1 to visualize log data in elasticsearch. However, Kibana seems to be having problems detecting which fields are indexed. In particular, it appears to be unable to detect if a field is indexed unless a non-default index option is chosen.

For example, it only detects if a string is indexed if the index option is set to "not_analyzed". However, if the index option is set to "analyzed", Kibana will not list it as an indexed field. The opposite is true for numbers. While, according to the documentation, a numeric type should not support "analyzed", Kibana seems to be requiring index to be set to that option. Here is an example of a manifest set that works:

    "disk_part" : {
    "type" : "string",
    "index": "not_analyzed",
    "store": "yes",
    "doc_values" : True
  },
  "mem_available" : {
    "type" : "long",
    "index": "analyzed",
    "store": "yes",
    "doc_values" : True 
  },

I could live with this hack, but I can't figure out how to get geo points working. My only guess is it is somehow related to a bit of a strange bug where include_defaults does not seem to do anything when making a request.

with :9200/status/_mapping/?pretty&include_defaults=true :

...
      "position" : {
        "type" : "geo_point",
        "store" : true,
        "lat_lon" : true,
        "geohash" : true
      },
...

with :9200/status/_mapping/?pretty :
...
"position" : {
"type" : "geo_point",
"store" : true,
"lat_lon" : true,
"geohash" : true
},
...

Thank you for your help.


(Lukas Olson) #2

However, Kibana seems to be having problems detecting which fields are indexed.

Are you referring to when you view the index pattern on the management page, or are you referring to the fields shown on the discover page, or something else?


(Yitzchak Lockerman) #3

The issue appears both in the Index Patterns and in the discover page. (both are consistent).


(Lukas Olson) #4

Could you take a screenshot of the index pattern in Kibana and then copy and paste the JSON from the mappings of the related indices?


(Yitzchak Lockerman) #5

Thank you again for your help.
I created the indexes. text_index one is recognised as indexed by Kibana while text_index2 is not

curl ... -XPUT <server_name>/test_index/  -d '{
    "mappings":{
      "test_type" : {
        "properties" : {
          "mem_available" : {
            "type" : "long",
            "index": "analyzed",
            "store": "yes"
          }
        }
      }
    }
}'

curl ... -XPUT <server_name>/test_index2/  -d '{
    "mappings":{
      "test_type2" : {
        "properties" : {
          "mem_available" : {
            "type" : "long",
            "index": "not_analyzed",
            "store": "yes"
          }
        }
      }
    }
}'

When I get the two indexes I have for the first index:

<server_name>/test_index?pretty

{
  "test_index" : {
    "aliases" : { },
    "mappings" : {
      "test_type" : {
        "properties" : {
          "mem_available" : {
            "type" : "long",
            "index" : "analyzed",
            "store" : true
          }
        }
      }
    },
    "settings" : {
      "index" : {
        "creation_date" : "1478889185433",
        "uuid" : "YSYS4y22SxyVTNlMsO-5Ew",
        "number_of_replicas" : "1",
        "number_of_shards" : "5",
        "version" : {
          "created" : "2040199"
        }
      }
    },
    "warmers" : { }
  }
}

<server_name>/test_index?pretty&include_defaults=true

 {
  "test_index" : {
    "aliases" : { },
    "mappings" : {
      "test_type" : {
        "properties" : {
          "mem_available" : {
            "type" : "long",
            "index" : "analyzed",
            "store" : true
          }
        }
      }
    },
    "settings" : {
      "index" : {
        "creation_date" : "1478889185433",
        "uuid" : "YSYS4y22SxyVTNlMsO-5Ew",
        "number_of_replicas" : "1",
        "number_of_shards" : "5",
        "version" : {
          "created" : "2040199"
        }
      }
    },
    "warmers" : { }
  }
}

And for the second index:

<server_name>/test_index2?pretty

{
  "test_index2" : {
    "aliases" : { },
    "mappings" : {
      "test_type2" : {
        "properties" : {
          "mem_available" : {
            "type" : "long",
            "store" : true
          }
        }
      }
    },
    "settings" : {
      "index" : {
        "creation_date" : "1478889234160",
        "uuid" : "Oeb8uKJfSA-s2ntT0LEmOw",
        "number_of_replicas" : "1",
        "number_of_shards" : "5",
        "version" : {
          "created" : "2040199"
        }
      }
    },
    "warmers" : { }
  }
}

<server_name>/test_index2?pretty&include_defaults=true

 {
  "test_index2" : {
    "aliases" : { },
    "mappings" : {
      "test_type2" : {
        "properties" : {
          "mem_available" : {
            "type" : "long",
            "store" : true
          }
        }
      }
    },
    "settings" : {
      "index" : {
        "creation_date" : "1478889234160",
        "uuid" : "Oeb8uKJfSA-s2ntT0LEmOw",
        "number_of_replicas" : "1",
        "number_of_shards" : "5",
        "version" : {
          "created" : "2040199"
        }
      }
    },
    "warmers" : { }
  }
}

Here are the screenshots.


(system) #6

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