org.apache.lucene.spatial.tier
Class DistanceQueryBuilder

java.lang.Object
  extended by org.apache.lucene.spatial.tier.DistanceQueryBuilder

public class DistanceQueryBuilder
extends Object

NOTE: This API is still in flux and might change in incompatible ways in the next release.


Constructor Summary
DistanceQueryBuilder(double lat, double lng, double miles, String geoHashFieldPrefix, String tierFieldPrefix, boolean needPrecise, int minTierIndexed, int maxTierIndexed)
          Create a distance query using a boundary box wrapper around a more precise DistanceFilter.
DistanceQueryBuilder(double lat, double lng, double miles, String latField, String lngField, String tierFieldPrefix, boolean needPrecise, int minTierIndexed, int maxTierIndexed)
          Create a distance query using a boundary box wrapper around a more precise DistanceFilter.
 
Method Summary
 DistanceFilter getDistanceFilter()
           
 Filter getFilter()
          Create a distance query using a boundary box wrapper around a more precise DistanceFilter.
 Filter getFilter(Query query)
           
 double getLat()
           
 double getLng()
           
 double getMiles()
           
 Query getQuery(Query query)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DistanceQueryBuilder

public DistanceQueryBuilder(double lat,
                            double lng,
                            double miles,
                            String latField,
                            String lngField,
                            String tierFieldPrefix,
                            boolean needPrecise,
                            int minTierIndexed,
                            int maxTierIndexed)
Create a distance query using a boundary box wrapper around a more precise DistanceFilter.

Parameters:
lat - The latitude to search around
lng - the Longitude to search around
miles - The radius to search within
latField - The name of the field containing the latitude
lngField - The name of the field containing the longitude
tierFieldPrefix - The prefix of the tier
needPrecise - if true, then distance is calculated in addition to tier info
minTierIndexed - The minimum tier level indexed
maxTierIndexed - The maximum tier level indexed

DistanceQueryBuilder

public DistanceQueryBuilder(double lat,
                            double lng,
                            double miles,
                            String geoHashFieldPrefix,
                            String tierFieldPrefix,
                            boolean needPrecise,
                            int minTierIndexed,
                            int maxTierIndexed)
Create a distance query using a boundary box wrapper around a more precise DistanceFilter.

Parameters:
lat -
lng -
miles -
Method Detail

getFilter

public Filter getFilter()
Create a distance query using a boundary box wrapper around a more precise DistanceFilter.


getFilter

public Filter getFilter(Query query)

getDistanceFilter

public DistanceFilter getDistanceFilter()

getQuery

public Query getQuery(Query query)

getLat

public double getLat()

getLng

public double getLng()

getMiles

public double getMiles()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.