The BIASDISTSPHERICAL
field specifier allows you to boost the score of any document according to its distance from a specified point using spherical coordinates (latitude/longitude).
FieldText=BIASDISTSPHERICAL{lat,long,range,maxboost}:LATFIELD:LONGFIELD
lat
|
The specified latitude. Specify latitude positions south of the equator as negative. |
long
|
The specified longitude. Specify longitude positions west of the Greenwich Meridian as negative. |
range
|
The distance in kilometers from the specified latitude and longitude. |
maxboost
|
The maximum percentage to boost the result. |
LATFIELD
|
The document field containing the latitude. |
LONGFIELD
|
The document field containing the longitude. |
You must specify two fields in the order latitude:longitude
. The fields must be
&fieldtext=BIASDISTSPHERICAL{52.2,0.1,100,7}:LAT:LONG
In this example, all documents within 100 kilometers of the point (lat,long)=(52.2,0.1)
are given a relevance boost. The maximum boost of 7
percent is given to documents at the given point. The boost decreases linearly down to 0 boost at 100 kilometers.
|