/** * Formats the site's location into a coordinate. * * @return A coordinate */ @Transient @JsonIgnore @Spatial(spatialMode = SpatialMode.HASH) public Coordinates getLocation() { return new Coordinates() { @Override public Double getLatitude() { return getSiteLatitude(); } @Override public Double getLongitude() { return getSiteLongitude(); } }; }
@Override public FullTextQuery setSpatialParameters(Coordinates center, String fieldName) { this.hsearchQuery.setSpatialParameters( center, fieldName ); return this; }
@Override public HSearchQuery setSpatialParameters(Coordinates center, String fieldName) { this.hsquery.setSpatialParameters( center, fieldName ); return this; }
/** * Defines the center of the spatial search for this query to project distance in results * * @param center the search center * @param fieldName name of the spatial field * * @return {@code this} for method chaining */ FullTextQuery setSpatialParameters(Coordinates center, String fieldName);
List<SimpleEntity> findByLocationWithin(Coordinates coordinates, double distance);
HSearchQuery setSpatialParameters(Coordinates center, String fieldName);