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 Hash, Distance and Spatial (Hash+Distance) filters and queries
  Author:
    Nicolas Helleringer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpatialQueryBuilder()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Query` | `buildSpatialQueryByHash(double latitude, double longitude, double radius, String fieldName)` Returns a Lucene Query which relies on Hibernate Search Spatial spatial hash indexation to find candidate documents and filter its results in radius range by a DistanceFilter
    `static Query` | `buildSpatialQueryByRange(double latitude, double longitude, double radius, String fieldName)` Returns a Lucene Query which relies on Hibernate Search Spatial double range 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

    - #### buildSpatialQueryByHash

          public static Query buildSpatialQueryByHash(double latitude,
                                                      double longitude,
                                                      double radius,
                                                      String fieldName)

      Returns a Lucene Query which relies on Hibernate Search Spatial spatial hash 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 Query buildSpatialQueryByRange(double latitude,
                                                       double longitude,
                                                       double radius,
                                                       String fieldName)

      Returns a Lucene Query which relies on Hibernate Search Spatial double range 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-2017 Red Hat, Inc. All Rights Reserved