如何在 Postgresql 中的几何列上创建 Gin 索引?

How to create a Gin index on a geometry column in Postgresql?

根据pgAdmin 4 4.21 documentation » Creating or Modifying a Table »

Select gin to create a GIN index. A GIN index may improve performance when managing two-dimensional geometric data types and nearest-neighbor searches

如果我们打算使用最近邻搜索,我们应该为几何列创建一个 Gin 索引,我就是这么做的!

然而,在定义 Gin 索引时,它要求 Operator Class 并且那里有两个选项(jsonb_path_obsgin_int_ops)但是none 其中适用于几何类型。

有人可以告诉我如何在几何类型列上创建 Gin 索引吗?

P.S 几何我指的是 PostGIS 的几何列类型

link to the thing you are quoting这样我们就不必去寻找它了。

这看起来像是 pgadmin4 文档中的错误。他们在这些描述中似乎颠倒了 GIN 和 GiST 标签。 GIN 比 GiST 更好地支持多个密钥,但不支持 nearest-neighbor 或空间。你想要一个 GiST 索引。