- java.lang.Object
-
- org.apache.lucene.search.SortField
-
- org.apache.lucene.document.LatLonPointSortField
-
final class LatLonPointSortField extends SortField
Sorts by distance from an origin location.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.SortField
SortField.Provider, SortField.Type
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double
latitude
(package private) double
longitude
-
Fields inherited from class org.apache.lucene.search.SortField
FIELD_DOC, FIELD_SCORE, missingValue, STRING_FIRST, STRING_LAST
-
-
Constructor Summary
Constructors Constructor Description LatLonPointSortField(java.lang.String field, double latitude, double longitude)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Returns true ifo
is equal to this.FieldComparator<?>
getComparator(int numHits, Pruning pruning)
Returns theFieldComparator
to use for sorting.java.lang.Double
getMissingValue()
Return the value to use for documents that don't have a value.int
hashCode()
Returns a hash code for thisSortField
instance.void
setMissingValue(java.lang.Object missingValue)
Set the value to use for documents that don't have a value.java.lang.String
toString()
-
Methods inherited from class org.apache.lucene.search.SortField
getBytesComparator, getComparatorSource, getField, getIndexSorter, getOptimizeSortWithIndexedData, getOptimizeSortWithPoints, getReverse, getType, needsScores, readType, rewrite, setBytesComparator, setOptimizeSortWithIndexedData, setOptimizeSortWithPoints
-
-
-
-
Method Detail
-
getComparator
public FieldComparator<?> getComparator(int numHits, Pruning pruning)
Description copied from class:SortField
Returns theFieldComparator
to use for sorting.- Overrides:
getComparator
in classSortField
- Parameters:
numHits
- number of top hits the queue will storepruning
- controls how can the comparator to skip documents viaLeafFieldComparator.competitiveIterator()
- Returns:
FieldComparator
to use when sorting
-
getMissingValue
public java.lang.Double getMissingValue()
Description copied from class:SortField
Return the value to use for documents that don't have a value. A value ofnull
indicates that default should be used.- Overrides:
getMissingValue
in classSortField
-
setMissingValue
public void setMissingValue(java.lang.Object missingValue)
Description copied from class:SortField
Set the value to use for documents that don't have a value.- Overrides:
setMissingValue
in classSortField
-
hashCode
public int hashCode()
Description copied from class:SortField
Returns a hash code for thisSortField
instance. If aFieldComparatorSource
was provided, it must properly implement hashCode (unless a singleton is always used).
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:SortField
Returns true ifo
is equal to this. If aFieldComparatorSource
was provided, it must properly implement equals (unless a singleton is always used).
-
-