WARNING: Do this in 6.0, to avoid backward compatibility problems that would arise if we changed the implementation in 6.1.
It seems the Lucene implementations trades precision for performance; see in particular how org.apache.lucene.geo.GeoEncodingUtils#encodeLatitudeCeil tries to fit a 64-bit double into 32 bits.
We should check whether this precision loss could be acceptable for most users, and if so document it, and if not we should consider alternatives.
Also, the Lucene geospatial feature is located in a “sandbox” jar that looks like it could not be maintained the same way as the rest of Lucene (maybe they would break APIs, remove it, …)
DECISION: use another implementation. We could:
Copy the Elasticsearch code to Hibernate Search
Copy the Elasticsearch code to the Lucene project and ask this to be promoted to the “core” code.
Let’s ask the Elasticsearch team how they feel about this. If they are okay with moving their code to Lucene, let’s help with that. If not, let’s just copy it to Hibernate Search (license-wise, this should be okay).