com.browseengine.bobo.facets.filter
Class GeoFacetFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by com.browseengine.bobo.facets.filter.RandomAccessFilter
          extended by com.browseengine.bobo.facets.filter.GeoFacetFilter
All Implemented Interfaces:
Serializable

public class GeoFacetFilter
extends RandomAccessFilter

Author:
nnarkhed
See Also:
Serialized Form

Constructor Summary
GeoFacetFilter(FacetHandler<GeoFacetHandler.GeoFacetData> facetHandler, float lat, float lon, float radius, boolean miles)
           
 
Method Summary
 RandomAccessDocIdSet getRandomAccessDocIdSet(BoboIndexReader reader)
           
static boolean inCircle(float docX, float docY, float docZ, float targetX, float targetY, float targetZ, float radCosine)
           
 
Methods inherited from class com.browseengine.bobo.facets.filter.RandomAccessFilter
getDocIdSet
 
Methods inherited from class org.apache.lucene.search.Filter
bits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoFacetFilter

public GeoFacetFilter(FacetHandler<GeoFacetHandler.GeoFacetData> facetHandler,
                      float lat,
                      float lon,
                      float radius,
                      boolean miles)
Parameters:
facetHandler - The Geo Facet Handler for this instance
lat - latitude value of the user's point of interest
lon - longitude value of the user's point of interest
radius - Radius from the point of interest
miles - variable to specify if the geo distance calculations are in miles. False indicates distance calculation is in kilometers
Method Detail

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.