public abstract class SpatialQueryBuilderFromCoordinates extends Object
| Constructor and Description |
|---|
SpatialQueryBuilderFromCoordinates() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.lucene.search.Query |
buildDistanceQuery(Coordinates center,
double radius,
String fieldName)
Returns a Lucene Query searching directly by computing distance against
all docs in the index (costly !)
|
static org.apache.lucene.search.Query |
buildDistanceQuery(org.apache.lucene.search.Query approximationQuery,
Coordinates center,
double radius,
String coordinatesField)
Returns a Lucene query to match documents by distance to a center.
|
static org.apache.lucene.search.Query |
buildDistanceQuery(org.apache.lucene.search.Query approximationQuery,
Coordinates center,
double radius,
String latitudeField,
String longitudeField)
Returns a Lucene query to match documents by distance to a center.
|
static org.apache.lucene.search.Query |
buildSpatialHashQuery(Coordinates center,
double radius,
String fieldName)
Returns a Lucene query to match documents by distance to a center,
relying only on spatial hashes.
|
static org.apache.lucene.search.Query |
buildSpatialQueryByHash(Coordinates center,
double radius,
String fieldName)
Returns a Lucene query to match documents by distance to a center,
relying first on spatial hash to approximate the result, and then on a more
precise (but more costly)
DistanceQuery. |
static org.apache.lucene.search.Query |
buildSpatialQueryByRange(Coordinates centerCoordinates,
double radius,
String fieldName)
Returns a Lucene Query which rely on double numeric range query
on Latitude / Longitude
|
public static org.apache.lucene.search.Query buildSpatialHashQuery(Coordinates center, double radius, String fieldName)
center - center of the search discusradius - distance max to center in kmfieldName - name of the Lucene Field implementing CoordinatesQuery,
Coordinatespublic static org.apache.lucene.search.Query buildDistanceQuery(org.apache.lucene.search.Query approximationQuery,
Coordinates center,
double radius,
String coordinatesField)
center - center of the search discusradius - distance max to center in kmcoordinatesField - name of the Lucene Field implementing CoordinatesapproximationQuery - an approximation of the distance query
(i.e. a query returning all the results returned by the distance query,
but also some false positives).
WARNING: when passing null, every single document will be scanned
(time/resource consuming!)Query,
Coordinatespublic static org.apache.lucene.search.Query buildDistanceQuery(org.apache.lucene.search.Query approximationQuery,
Coordinates center,
double radius,
String latitudeField,
String longitudeField)
center - center of the search discusradius - distance max to center in kmlatitudeField - name of the Lucene Field hosting latitudelongitudeField - name of the Lucene Field hosting longitudeapproximationQuery - an approximation of the distance query
(i.e. a query returning all the results returned by the distance query,
but also some false positives).
WARNING: when passing null, every single document will be scanned
(time/resource consuming!)Query,
Coordinatespublic static org.apache.lucene.search.Query buildDistanceQuery(Coordinates center, double radius, String fieldName)
center - center of the search discusradius - distance max to center in kmfieldName - name of the Lucene Field implementing CoordinatesQuery,
Coordinatespublic static org.apache.lucene.search.Query buildSpatialQueryByHash(Coordinates center, double radius, String fieldName)
DistanceQuery.center - center of the search discusradius - distance max to center in kmfieldName - name of the Lucene Field implementing CoordinatesQuery,
Coordinatespublic static org.apache.lucene.search.Query buildSpatialQueryByRange(Coordinates centerCoordinates, double radius, String fieldName)
centerCoordinates - center of the search discusradius - distance max to center in kmfieldName - name of the Lucene Field implementing CoordinatesQuery,
CoordinatesCopyright © 2006–2017 Hibernate. All rights reserved.