Skip to content

Mistake in documentaion regarding maximum level of QuadPrefixTree(29 not 50) #21191

Closed
@chintan-shah-25

Description

@chintan-shah-25

I was looking at this stackoverflow question regarding geo shape mapping. (ES version 2.3)

Documentation says

The maximum amount of levels for the quad trees in Elasticsearch is 50.

but according to source code quadtree maps to lucene PackedQuadPrefixTree which says max levels is 29 and not 50. The code below fails saying "maxLevels of 36 exceeds limit of 29"

PUT test_index

PUT test_index/_mapping/test_type
{
  "properties": {
    "text": {
      "type": "geo_shape",
      "tree": "quadtree",
      "precision": "1mm"
    }
  }
} 

Also there is no documentation regarding 'legacyquadtree' and if you give very high value of tree_levels like below, it throws OOM rather than saying max allowed level is 50

PUT test_index/_mapping/test_type
{
  "properties": {
    "text": {
      "type": "geo_shape",
      "tree": "legacyquadtree",
      "tree_levels": "54354552"
    }
  }
}

Metadata

Metadata

Assignees

Labels

:Analytics/GeoIndexing, search aggregations of geo points and shapes>docsGeneral docs changesgood first issuelow hanging fruit

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions