You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/index-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,7 @@ Range indexes can be used on scalar values (string or number). The default index
147
147
SELECT * FROM c WHERE ST_INTERSECTS(c.property, { 'type':'Polygon', 'coordinates': [[ [31.8, -5], [32, -5], [31.8, -5] ]] })
148
148
```
149
149
150
-
Spatial indexes can be used on correctly formatted [GeoJSON](./sql-query-geospatial-intro.md) objects. Points, LineStrings, Polygons, and MultiPolygons are currently supported. To use this index type, set by using the `"kind": "Range"` property when configuring the indexing policy. To learn how to configure spatial indexes, see [Spatial indexing policy examples](how-to-manage-indexing-policy.md#spatial-index)
150
+
Spatial indexes can be used on correctly formatted [GeoJSON](./sql-query-geospatial-intro.md) objects. Points, LineStrings, Polygons, and MultiPolygons are currently supported. To learn how to configure spatial indexes, see [Spatial indexing policy examples](how-to-manage-indexing-policy.md#spatial-index)
Copy file name to clipboardExpand all lines: articles/cosmos-db/index-policy.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -335,7 +335,7 @@ A container's indexing policy can be updated at any time [by using the Azure por
335
335
> Index transformation is an operation that consumes [Request Units](request-units.md). Request Units consumed by an index transformation aren't currently billed if you are using [serverless](serverless.md) containers. These Request Units will get billed once serverless becomes generally available.
336
336
337
337
> [!NOTE]
338
-
> You can track the progress of index transformation in the Azure portal or [by using one of the SDKs](how-to-manage-indexing-policy.md).
338
+
> You can track the progress of index transformation in the [Azure portal](how-to-manage-indexing-policy.md#use-the-azure-portal) or by [using one of the SDKs](how-to-manage-indexing-policy.md#dotnet-sdk).
339
339
340
340
There's no impact to write availability during any index transformations. The index transformation uses your provisioned RUs but at a lower priority than your CRUD operations or queries.
@@ -44,40 +44,6 @@ Here are some examples of indexing policies shown in [their JSON format](../inde
44
44
}
45
45
```
46
46
47
-
This indexing policy is equivalent to the one below which manually sets ```kind```, ```dataType```, and ```precision``` to their default values. These properties are no longer necessary to explicitly set and you should omit them from your indexing policy entirely (as shown in above example). If you try to set these properties, they'll be automatically removed from your indexing policy.
### Opt-in policy to selectively include some property paths
82
48
83
49
```json
@@ -99,48 +65,6 @@ This indexing policy is equivalent to the one below which manually sets ```kind`
99
65
}
100
66
```
101
67
102
-
This indexing policy is equivalent to the one below which manually sets ```kind```, ```dataType```, and ```precision``` to their default values. These properties are no longer necessary to explicitly set and you should omit them from your indexing policy entirely (as shown in above example). If you try to set these properties, they'll be automatically removed from your indexing policy.
> It is generally recommended to use an **opt-out** indexing policy to let Azure Cosmos DB proactively index any new property that may be added to your data model.
146
70
@@ -377,36 +301,6 @@ To create a container with a custom indexing policy see, [Create a container wit
377
301
378
302
## <aid="dotnet-sdk"></a> Use the .NET SDK
379
303
380
-
# [.NET SDK V2](#tab/dotnetv2)
381
-
382
-
The `DocumentCollection` object from the [.NET SDK v2](https://www.nuget.org/packages/Microsoft.Azure.DocumentDB/) exposes an `IndexingPolicy` property that lets you change the `IndexingMode` and add or remove `IncludedPaths` and `ExcludedPaths`.
The `ContainerProperties` object from the [.NET SDK v3](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/) (see [this Quickstart](quickstart-dotnet.md) regarding its usage) exposes an `IndexingPolicy` property that lets you change the `IndexingMode` and add or remove `IncludedPaths` and `ExcludedPaths`.
The `DocumentCollection` object from the [.NET SDK v2](https://www.nuget.org/packages/Microsoft.Azure.DocumentDB/) exposes an `IndexingPolicy` property that lets you change the `IndexingMode` and add or remove `IncludedPaths` and `ExcludedPaths`.
Returns the total area of a GeoJSON Polygon or MultiPolygon expression. To learn more, see the [Geospatial and GeoJSON location data](geospatial-intro.md) article.
18
+
19
+
## Syntax
20
+
21
+
```sql
22
+
ST_AREA (<spatial_expr>)
23
+
```
24
+
25
+
## Arguments
26
+
27
+
*spatial_expr*
28
+
Is any valid GeoJSON Polygon or MultiPolygon object expression.
29
+
30
+
## Return types
31
+
32
+
Returns the total area of a set of points. This is expressed in square meters for the default reference system.
33
+
34
+
## Examples
35
+
36
+
The following example shows how to return the area of a polygon using the `ST_AREA` built-in function.
37
+
38
+
```sql
39
+
SELECT ST_AREA({
40
+
"type":"Polygon",
41
+
"coordinates":[ [
42
+
[ 31.8, -5 ],
43
+
[ 32, -5 ],
44
+
[ 32, -4.7 ],
45
+
[ 31.8, -4.7 ],
46
+
[ 31.8, -5 ]
47
+
] ]
48
+
}) as Area
49
+
```
50
+
51
+
Here is the result set.
52
+
53
+
```json
54
+
[
55
+
{
56
+
"Area": 735970283.0522614
57
+
}
58
+
]
59
+
```
60
+
61
+
## Remarks
62
+
63
+
Using the ST_AREA function to calculate the area of zero or one-dimensional figures like GeoJSON Points and LineStrings will result in an area of 0.
64
+
65
+
> [!NOTE]
66
+
> The GeoJSON specification requires that points within a Polygon be specified in counter-clockwise order. A Polygon specified in clockwise order represents the inverse of the region within it.
The following example shows how to return all family documents that are within 30 km of the specified location using the `ST_DISTANCE` built-in function. .
34
+
The following example shows how to return all family documents that are within 30 km of the specified location using the `ST_DISTANCE` built-in function.
0 commit comments