|
Hi Alan,
Why do you specify .onField("location") on the second query ?
Have the objects for the second query been indexed in a different manner that those for the first query ?
You havt to use .onField("location") only when you have not been using HSearch default indexation field (Spatial.COORDINATES_DEFAULT_FIELD). If you have been indexing with two properties flagged by @Latitude and @Longitude annotations only you have been using Spatial.COORDINATES_DEFAULT_FIELD.
.onField("location") is only required and useful when your objects do have a complex position handling system and you do implement the @Coordinates interface.
So my guess is 1) Remove the .onField("location") from the seconde query 2) specify your spatial parameter with hibQuery.setSpatialParameters( startLat, startLon, Spatial.COORDINATES_DEFAULT_FIELD )
I ll dig a little more in Infinispan code to check the truth out there but I do not know that project at code level.
|