|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.search.Filter
org.hibernate.search.spatial.impl.DistanceFilter
public final class DistanceFilter
Lucene Filter for filtering documents which have been indexed with Hibernate Search spatial Field bridge Use double lat,long field in the index from a Coordinates field declaration
SpatialFieldBridgeByQuadTree
,
SpatialFieldBridgeByRange
,
Coordinates
,
Serialized FormConstructor Summary | |
---|---|
DistanceFilter(org.apache.lucene.search.Filter previousFilter,
Point center,
double radius,
String coordinatesField)
Construct a Distance Filter to match document distant at most of radius from center Point |
|
DistanceFilter(org.apache.lucene.search.Filter previousFilter,
Point center,
double radius,
String latitudeField,
String longitudeField)
Construct a Distance Filter to match document distant at most of radius from center Point |
Method Summary | |
---|---|
org.apache.lucene.search.DocIdSet |
getDocIdSet(org.apache.lucene.index.IndexReader reader)
Returns Doc Ids by retrieving their lat,long and checking if within distance(radius) of the center of the search |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DistanceFilter(org.apache.lucene.search.Filter previousFilter, Point center, double radius, String coordinatesField)
previousFilter
- previous Filter in the chain. As Distance is costly by retrieving the lat and long field
it is better to use it lastcenter
- center of the search perimeterradius
- radius of the search perimetercoordinatesField
- name of the field implementing CoordinatesCoordinates
public DistanceFilter(org.apache.lucene.search.Filter previousFilter, Point center, double radius, String latitudeField, String longitudeField)
previousFilter
- previous Filter in the chain. As Distance is costly by retrieving the lat and long field
it is better to use it lastcenter
- center of the search perimeterradius
- radius of the search perimeterlatitudeField
- name of the field hosting latitudelongitudeField
- name of the field hosting longitudeCoordinates
Method Detail |
---|
public org.apache.lucene.search.DocIdSet getDocIdSet(org.apache.lucene.index.IndexReader reader) throws IOException
getDocIdSet
in class org.apache.lucene.search.Filter
reader
- reader to the index
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |