org.apache.lucene.spatial.tier
Class DistanceFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by org.apache.lucene.spatial.tier.DistanceFilter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GeoHashDistanceFilter, LatLongDistanceFilter

public abstract class DistanceFilter
extends Filter

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

See Also:
Serialized Form

Field Summary
protected  double distance
           
protected  WeakHashMap<String,Double> distanceLookupCache
           
protected  Map<Integer,Double> distances
           
protected  int nextDocBase
           
protected  DistanceHandler.Precision precise
           
protected  Filter startingFilter
           
 
Constructor Summary
DistanceFilter(Filter startingFilter, double distance)
          Filters the startingFilter by precise distance checking filter
 
Method Summary
abstract  boolean equals(Object o)
          Returns true if o is equal to this.
 Double getDistance(int docid)
           
 Map<Integer,Double> getDistances()
           
abstract  int hashCode()
          Returns a hash code value for this object.
 void reset()
          You must call this before re-using this DistanceFilter across searches
 void setDistances(Map<Integer,Double> distances)
           
 
Methods inherited from class org.apache.lucene.search.Filter
getDocIdSet
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startingFilter

protected final Filter startingFilter

precise

protected DistanceHandler.Precision precise

distances

protected Map<Integer,Double> distances

distance

protected double distance

nextDocBase

protected int nextDocBase

distanceLookupCache

protected transient WeakHashMap<String,Double> distanceLookupCache
Constructor Detail

DistanceFilter

public DistanceFilter(Filter startingFilter,
                      double distance)
Filters the startingFilter by precise distance checking filter

Method Detail

getDistances

public Map<Integer,Double> getDistances()

getDistance

public Double getDistance(int docid)

setDistances

public void setDistances(Map<Integer,Double> distances)

reset

public void reset()
You must call this before re-using this DistanceFilter across searches


equals

public abstract boolean equals(Object o)
Returns true if o is equal to this.

Overrides:
equals in class Object

hashCode

public abstract int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Object


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