Details

Type: Improvement

Status: Closed

Priority: Major

Resolution: Fixed

Affects Version/s: None

Fix Version/s: 5.1

Component/s: modules/spatial

Labels:None

Lucene Fields:New
Description
Indexed nonpoint shapes are comprised of a set of terms that represent grid cells. Cells completely within the shape or cells on the intersecting edge that are at the maximum detail depth being indexed for the shape are denoted as "leaf" cells. Such cells have a trailing '+' at the end. Such tokens are actually indexed twice, one with the leaf byte and one without.
The TermQuery based PrefixTree Strategy doesn't consider the notion of 'leaf' cells and so the tokens with '+' are completely redundant.
The Recursive [algorithm] based PrefixTree Strategy better supports correct search of indexed nonpoint shapes than TermQuery does and the distinction is relevant. However, the foundational search algorithms used by this strategy (Intersects & Contains; the other 2 are based on these) could each be upgraded to deal with this correctly. Not trivial but very doable.
In the end, spatial nonpoint indexes can probably be trimmed my ~40% by doing this.
Issue Links
 relates to

LUCENE5529 Spatial: Small optimization searching on indexed nonpoint shapes
 Closed
Without the + (or equivalent) how do you know that everything below that is covered by the shape?