Solr geodist() 函数 return 的测量单位是什么?
What unit of measurement does the Solr geodist() function return?
我一直在用solr的geodist()函数来return两点之间的距离,但是returns的数据总是小于1。我只想知道是什么单位测量 geodist() 方法 return?
度量单位取决于您使用该函数的字段的架构配置 (schema.xml)。 solr 文档对 RPT (SpatialRecursivePrefixTreeFieldType) 说:
distanceUnits
This is used to specify the units for distance measurements used
throughout the use of this field. This can be degrees, kilometers or
miles. It is applied to nearly all distance measurements involving the
field: maxDistErr, distErr, d, geodist and the score when score is
distance, area, or area2d. However, it doesn’t affect distances
embedded in WKT strings, (e.g., BUFFER(POINT(200 10),0.2)), which are
still in degrees.
distanceUnits defaults to either kilometers if geo is true, or degrees
if geo is false.
https://lucene.apache.org/solr/guide/8_5/spatial-search.html#schema-configuration-for-rpt
我一直在用solr的geodist()函数来return两点之间的距离,但是returns的数据总是小于1。我只想知道是什么单位测量 geodist() 方法 return?
度量单位取决于您使用该函数的字段的架构配置 (schema.xml)。 solr 文档对 RPT (SpatialRecursivePrefixTreeFieldType) 说:
distanceUnits
This is used to specify the units for distance measurements used throughout the use of this field. This can be degrees, kilometers or miles. It is applied to nearly all distance measurements involving the field: maxDistErr, distErr, d, geodist and the score when score is distance, area, or area2d. However, it doesn’t affect distances embedded in WKT strings, (e.g., BUFFER(POINT(200 10),0.2)), which are still in degrees.
distanceUnits defaults to either kilometers if geo is true, or degrees if geo is false.
https://lucene.apache.org/solr/guide/8_5/spatial-search.html#schema-configuration-for-rpt