com.browseengine.bobo.facets.filter
Class GeoFacetFilter
java.lang.Object
org.apache.lucene.search.Filter
com.browseengine.bobo.facets.filter.RandomAccessFilter
com.browseengine.bobo.facets.filter.GeoFacetFilter
- All Implemented Interfaces:
- Serializable
public class GeoFacetFilter
- extends RandomAccessFilter
- Author:
- nnarkhed
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeoFacetFilter
public GeoFacetFilter(FacetHandler<GeoFacetHandler.GeoFacetData> facetHandler,
float lat,
float lon,
float radius,
boolean miles)
- Parameters:
facetHandler - The Geo Facet Handler for this instancelat - latitude value of the user's point of interestlon - longitude value of the user's point of interestradius - Radius from the point of interestmiles - variable to specify if the geo distance calculations are in miles. False indicates distance calculation is in kilometers
getRandomAccessDocIdSet
public RandomAccessDocIdSet getRandomAccessDocIdSet(BoboIndexReader reader)
throws IOException
- Specified by:
getRandomAccessDocIdSet in class RandomAccessFilter
- Throws:
IOException
inCircle
public static boolean inCircle(float docX,
float docY,
float docZ,
float targetX,
float targetY,
float targetZ,
float radCosine)
Copyright © 2011. All Rights Reserved.