Skip to content

Docs out of sync regarding default values for geo_shape mapping #23206

Closed
@adambro

Description

@adambro

Elasticsearch version: number": "5.1.1", "build_hash": "5395e21" from official Docker image

Description of the problem including expected versus actual behavior:

When I query the default mapping values using mapping API with ?include_defaults=true I'm getting the following for geo_shape field:

{
              "type": "geo_shape",
              "tree": "geohash",
              "tree_levels": 0,
              "precision": "-1.0m",
              "strategy": "recursive",
              "distance_error_pct": 0.025,
              "orientation": "RIGHT",
              "points_only": false,
              "coerce": false
 }

Above values do not match the default values mentioned in documentation:
https://www.elastic.co/guide/en/elasticsearch/reference/5.1/geo-shape.html#geo-shape-mapping-options

Here's the query result when I've added precision: 1m property to geo_shape mapping:

{
              "type": "geo_shape",
              "tree": "geohash",
              "tree_levels": 0,
              "precision": "1.0m",
              "strategy": "recursive",
              "distance_error_pct": 0.0,
              "orientation": "RIGHT",
              "points_only": false,
              "coerce": false
}

Still tree_levels is 0 (which is confusing). On the other hand distance_error_pct changes to 0 as documented.

Not sure if it's only docs out o date, because:

  • tree_levels: 0 seems to be a bug
  • precision: "-1.0m" by default does not make sense

Metadata

Metadata

Assignees

Labels

:Analytics/GeoIndexing, search aggregations of geo points and shapesgood first issuelow hanging fruit

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions