org.hibernate.search.spatial
Class SpatialQueryBuilder

java.lang.Object
  extended by 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

Constructor Summary
SpatialQueryBuilder()
           
 
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
 

Constructor Detail

SpatialQueryBuilder

public SpatialQueryBuilder()
Method Detail

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 search
longitude - WGS84 longitude of the center of the search
radius - distance max to center in km
fieldName - 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 search
longitude - WGS84 longitude of the center of the search
radius - distance max to center in km
fieldName - 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