org.hibernate.search.spatial
Class SpatialQueryBuilder
java.lang.Object
org.hibernate.search.spatial.SpatialQueryBuilder
public abstract class SpatialQueryBuilder
- extends Object
The SpatialQueryBuilder hold builder methods for Quad Tree, Distance and Spatial (Quad Tree+Distance) filters
and queries
- Author:
- Nicolas Helleringer
Method Summary |
static org.apache.lucene.search.Query |
buildSpatialQueryByQuadTree(double latitude,
double longitude,
double radius,
String fieldName)
Returns a Lucene Query which relies on Hibernate Search Spatial
quad tree indexation to find candidate documents and filter its results
in radius range by a DistanceFilter |
static org.apache.lucene.search.Query |
buildSpatialQueryByRange(double latitude,
double longitude,
double radius,
String fieldName)
Returns a Lucene Query which relies on Hibernate Search Spatial
quad tree indexation to filter document at radius and filter its results
by a fine DistanceFilter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpatialQueryBuilder
public SpatialQueryBuilder()
buildSpatialQueryByQuadTree
public static org.apache.lucene.search.Query buildSpatialQueryByQuadTree(double latitude,
double longitude,
double radius,
String fieldName)
- Returns a Lucene Query which relies on Hibernate Search Spatial
quad tree indexation to find candidate documents and filter its results
in radius range by a DistanceFilter
- Parameters:
latitude
- WGS84 latitude of the center of the searchlongitude
- WGS84 longitude of the center of the searchradius
- distance max to center in kmfieldName
- name of the Lucene Field implementing Coordinates
- Returns:
- Lucene Query to be used in a search
- See Also:
Query
,
Coordinates
buildSpatialQueryByRange
public static org.apache.lucene.search.Query buildSpatialQueryByRange(double latitude,
double longitude,
double radius,
String fieldName)
- Returns a Lucene Query which relies on Hibernate Search Spatial
quad tree indexation to filter document at radius and filter its results
by a fine DistanceFilter
- Parameters:
latitude
- WGS84 latitude of the center of the searchlongitude
- WGS84 longitude of the center of the searchradius
- distance max to center in kmfieldName
- name of the Lucene Field implementing Coordinates
- Returns:
- Lucene Query to be used in a search
- See Also:
Query
,
Coordinates
Copyright © 2006-2013 Red Hat Middleware, LLC. All Rights Reserved