Reputation: 27976
I'm wanting to perform a spatial search in Hibernate. In particular, I'd like to store some items with a latitude / longitude then query which items are within x km of a given point.
I have found that the hibernate-search provides support for spatial queries through it's Lucene integration.
I also know that the spatial module in Lucene has been completely rewritten in Lucene version 4.0 but the latest version of hibernate-search is using Lucene 3.6.2 of Lucene.
So, I have a few questions:
Upvotes: 1
Views: 910
Reputation: 6107
No it was not, we where lucky enough to get a geolocation field expert joining the team for your same reasons: Nicolas wanted to avoid using the spatial module in Lucene because of its problems.
No it's a set of custom Lucene components; the embedded nature of Hibernate Search made our requirements very simple, at least in terms of Lucene integration (distance math is still interesting).
The limitations from the original module where of inspiration and motivation to the creation of the new extension, so I believe not, assuming it's the same known limitations we talk about.
That is very likely, our focus at this point is to provide a sensible and practical API; with the relatively simple functionality covered today we might not need to rush on it, but we're not excluding integrating it. A better support for Spatial types is planned for Hibernate ORM too, so we might want to integrate the custom types: help and advise is welcome, even if just in use case or wish form.
We have been very proud of our API stability in the past and will try hard to maintain the record. We will definitely upgrade to Lucene 4+ but this will likely have to break some APIs (not necessarily related to Spatial). We're going to try hard to keep changes to the minimum. This is one of the reasons to not expose too much yet: make sure we keep flexibility for the implementation, at least now that we're preparing for the upgrade.
Upvotes: 4