如何使用地理空间搜索在 solr 中索引 d 维向量?

How to index d dimensional vector in solr using geospatial search?

我正在尝试为 solr 创建一个插件,它将启用索引 3d 模型。我将从几个不同的视图中获取每个模型的 'screenshots' 并对这些图像进行预处理,以便它们将以一维向量表示。

我想为此目的使用 lucene/solr 地理空间搜索,因为我看到有一个选项可以索引一个矢量(大于 2 dims)并根据矢量的距离进行搜索(根据位置) .

不幸的是,这个选项的文档上周消失了,它没有缓存在 google。

如何索引维度 > 2 的位置向量?

文档的 link 在这里: https://wiki.apache.org/solr

我是从这里找到的: https://lucene.apache.org/solr/guide/6_6/spatial-search.html#SpatialSearch-LatLonPointSpatialField

地理空间搜索旨在与 n-dimension 点 (Lucene) 一起使用,但似乎 Solr 实现的维度高于 2d is not available

如果为每个字段索引一维 vector/coordinate(使用双字段类型),您仍然可以使用 Solr 进行 3d 空间搜索。

然后,为了根据距给定点的距离查询和排序文档,而不是使用 geodist(sfield2D,x,y),您可以使用 dist() :

Returns the distance between two vectors (points) in an n-dimensional space. Takes in the power, plus two or more ValueSource instances and calculates the distances between the two vectors.

要计算任意点 (0,0,0) 与每个文档的索引点之间的欧氏距离,您可以使用:

dist(2, fieldx, fieldy, fieldz, 0, 0, 0) 

另见:
- Calculate distance in 3D space
- Distance Sorting or Boosting (Function Queries)
-