Skip to content

docvalue_fields for geo_shape returns unsupported_operation_exception #55487

@nreese

Description

@nreese

Requesting docvalue_fields for a geo_shape field returns unsupported_operation_exception.

Data set

PUT /example
{
    "mappings": {
        "properties": {
            "location": {
                "type": "geo_shape"
            }
        }
    }
}
POST /example/_doc
{
    "location" : {
        "type" : "linestring",
        "coordinates" : [[-77.03653, 38.897676], [-77.009051, 38.889939]]
    }
}

Working query

GET example/_search
{
  "query": {
    "match_all": {}
  }
}

Query requesting docvalue_fields fails.

GET shapes/_search
{
  "query": {
    "match_all": {}
  },
  "docvalue_fields": ["location"]
}

Error response

{
  "error" : {
    "root_cause" : [
      {
        "type" : "unsupported_operation_exception",
        "reason" : "scripts and term aggs are not supported by geo_shape doc values"
      }
    ],
    "type" : "search_phase_execution_exception",
    "reason" : "all shards failed",
    "phase" : "query",
    "grouped" : true,
    "failed_shards" : [
      {
        "shard" : 0,
        "index" : "example",
        "node" : "Ef8381lmQ82FBAh45eWkZA",
        "reason" : {
          "type" : "unsupported_operation_exception",
          "reason" : "scripts and term aggs are not supported by geo_shape doc values"
        }
      }
    ],
    "caused_by" : {
      "type" : "unsupported_operation_exception",
      "reason" : "scripts and term aggs are not supported by geo_shape doc values",
      "caused_by" : {
        "type" : "unsupported_operation_exception",
        "reason" : "scripts and term aggs are not supported by geo_shape doc values"
      }
    }
  },
  "status" : 500
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Analytics/GeoIndexing, search aggregations of geo points and shapesTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions