From e40c0704d817f330fb4a8e7212ace30d1d0451a2 Mon Sep 17 00:00:00 2001 From: randomJoe211 <69501902+randomJoe211@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:37:04 +0800 Subject: [PATCH] Update 10.geography.md (#1746) --- .../3.ngql-guide/3.data-types/10.geography.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs-2.0/3.ngql-guide/3.data-types/10.geography.md b/docs-2.0/3.ngql-guide/3.data-types/10.geography.md index 475c30977d..d4bb923d46 100644 --- a/docs-2.0/3.ngql-guide/3.data-types/10.geography.md +++ b/docs-2.0/3.ngql-guide/3.data-types/10.geography.md @@ -50,29 +50,29 @@ nebula> INSERT EDGE any_shape_edge(geo) VALUES "201"->"302":(ST_GeogFromText("PO //查询点 103 的属性 geo。 nebula> FETCH PROP ON any_shape "103" YIELD ST_ASText(any_shape.geo); -+----------+---------------------------------+ -| VertexID | ST_ASText(any_shape.geo) | -+----------+---------------------------------+ -| "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | -+----------+---------------------------------+ ++---------------------------------+ +| ST_ASText(any_shape.geo) | ++---------------------------------+ +| "POLYGON((0 1, 1 2, 2 3, 0 1))" | ++---------------------------------+ //查询边 201->302 的属性 geo。 nebula> FETCH PROP ON any_shape_edge "201"->"302" YIELD ST_ASText(any_shape_edge.geo); -+---------------------+---------------------+----------------------+---------------------------------+ -| any_shape_edge._src | any_shape_edge._dst | any_shape_edge._rank | ST_ASText(any_shape_edge.geo) | -+---------------------+---------------------+----------------------+---------------------------------+ -| "201" | "302" | 0 | "POLYGON((0 1, 1 2, 2 3, 0 1))" | -+---------------------+---------------------+----------------------+---------------------------------+ ++---------------------------------+ +| ST_ASText(any_shape_edge.geo) | ++---------------------------------+ +| "POLYGON((0 1, 1 2, 2 3, 0 1))" | ++---------------------------------+ //为 geo 属性创建索引并使用 LOOKUP 查询。 nebula> CREATE TAG INDEX IF NOT EXISTS any_shape_geo_index ON any_shape(geo); nebula> REBUILD TAG INDEX any_shape_geo_index; nebula> LOOKUP ON any_shape YIELD ST_ASText(any_shape.geo); -+----------+-------------------------------------------------+ -| VertexID | ST_ASText(any_shape.geo) | -+----------+-------------------------------------------------+ -| "103" | "POLYGON((0 1, 1 2, 2 3, 0 1))" | -+----------+-------------------------------------------------+ ++---------------------------------+ +| ST_ASText(any_shape.geo) | ++---------------------------------+ +| "POLYGON((0 1, 1 2, 2 3, 0 1))" | ++---------------------------------+ ``` 为 geo 属性创建索引时,还可以指定 geo 索引的参数。说明如下。 @@ -90,4 +90,4 @@ nebula> LOOKUP ON any_shape YIELD ST_ASText(any_shape.geo); ```ngql nebula> CREATE TAG INDEX IF NOT EXISTS any_shape_geo_index ON any_shape(geo) with (s2_max_level=30, s2_max_cells=8); -``` \ No newline at end of file +```