GeoHash grid aggregation error

I want to do GeoHash grid aggregation on data avalilable in elastic search. I write the query like
POST geoindex/geodata/_search?size=0
{
"aggregations" : {
"large-grid" : {
"geohash_grid" : {
"field" : "geometry",
"precision" : 3
}
}
}
}
then i got the error like
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Fielddata is not supported on field [geometry] of type [geo_shape]"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "geoindex",
"node": "ixkwhg3ST1-3l-_rX5b9de",
"reason": {
"type": "illegal_argument_exception",
"reason": "Fielddata is not supported on field [geometry] of type [geo_shape]"
}
}
],
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Fielddata is not supported on field [geometry] of type [geo_shape]",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Fielddata is not supported on field [geometry] of type [geo_shape]"
}
}
},
"status": 400
and also i tried to set field data true
PUT geoindex/_mapping/geodata
{
"properties": {
"geometry": {
"type": "geo_shape",
"fielddata": true
}
}
}
i got the error like
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [geometry] has unsupported parameters: [fielddata : true]"
}
],
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [geometry] has unsupported parameters: [fielddata : true]"
},
"status": 400
}
How to resolve this error . please help me.

Hi

I have the identical issue. However, we have 3 environments and the issue is seen in 2 of the 3 only. 1 environment works fine.

  • The data is an exact replica in each environment;
  • The data originated in a 5.6 Elastic but was dumped out and then imported. All other elements/searches/visualizations are working fine
  • The Kibana objects were exported from the working environment and imported into the other 2 (we even deleted the existing saved objects to start with a clean slate)
  • The index mappings are identical between environments (double checked with a compare tool)
  • The index settings are identical between environments
  • the field (called location) is a geoip field with valid lat/long values (i pasted them into
    a web site that converts them to actual addresses and it was as expected)

The problem was originally seen with an existing, imported visualization but the same error is seen when we try to create a new geoip visualization.

Clearly we have a difference somewhere between environment 1 and the environments 2 and 3 but its not obvious as to where.

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