[hibernate-dev] Hibernate Search Spatial: Units?

Sanne Grinovero sanne at hibernate.org
Tue Oct 9 12:45:19 EDT 2012


Hi Nicolas,

In the QueryBuilder DSL a spatial Query has a nice option to define
which units are being used:

org.apache.lucene.search.Query luceneQuery =
builder.spatial().onCoordinates( UserRange.class.getName() )
				.within( 50, Unit.KM ).ofLatitude( centerLatitude ).andLongitude(
centerLongitude ).createQuery();


org.hibernate.search.spatial.SpatialQueryBuilder.buildSpatialQueryByGrid(double,
double, double, String)
has a javadoc comment specifying the parameters are expected to be KM.

I guess we should pick a strategy and be consistent with it; I think
we should add the Unit parameter to the SpatialQueryBuilder;

Any thoughts about it? Can I assume you'll be able to look into that?

Cheers,
Sanne

Tracked by https://hibernate.onjira.com/browse/HSEARCH-1203


More information about the hibernate-dev mailing list