Skip to content

Commit 5664944

Browse files
authored
Final draft
1 parent 4cf5a71 commit 5664944

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

articles/cosmos-db/nosql/how-to-geospatial-index-query.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ All containers include a default indexing policy that will successfully index ge
4141

4242
1. Create a shell variable for the name of your Azure Cosmos DB for NoSQL account and resource group.
4343

44-
```azurecli
44+
```azurecli-interactive
4545
# Variable for resource group name
4646
resourceGroupName="<name-of-your-resource-group>"
4747
@@ -51,7 +51,7 @@ All containers include a default indexing policy that will successfully index ge
5151
5252
1. Create a new database named ``cosmicworks`` using [``az cosmosdb sql database create``](/cli/azure/cosmosdb/sql/database#az-cosmosdb-sql-database-create).
5353
54-
```azurecli
54+
```azurecli-interactive
5555
az cosmosdb sql database create \
5656
--resource-group $resourceGroupName \
5757
--account-name $accountName \
@@ -89,7 +89,7 @@ All containers include a default indexing policy that will successfully index ge
8989
9090
1. Use [``az cosmosdb sql container create``](/cli/azure/cosmosdb/sql/container#az-cosmosdb-sql-container-create) to create a new container named ``locations`` with a partition key path of ``/region``.
9191
92-
```azurecli
92+
```azurecli-interactive
9393
az cosmosdb sql container create \
9494
--resource-group $resourceGroupName \
9595
--account-name $accountName \
@@ -101,7 +101,7 @@ All containers include a default indexing policy that will successfully index ge
101101
102102
1. Retrieve the primary connection string for the account using [``az cosmosdb keys list``](/cli/azure/cosmosdb/keys#az-cosmosdb-keys-list).
103103
104-
```azurecli
104+
```azurecli-interactive
105105
az cosmosdb keys list \
106106
--resource-group $resourceGroupName \
107107
--name $accountName \
@@ -180,10 +180,10 @@ The .NET SDK includes multiple types in the [``Microsoft.Azure.Cosmos.Spatial``]
180180
181181
| | Type | Description | Default value |
182182
| --- | --- | --- | --- |
183-
| **``id``** | ``string`` | Unique identifier | |
184-
| **``name``** | ``string`` | Name of the office | |
185-
| **``location``** | ``Point`` | GeoJSON geographical point | |
186-
| **``category``** | ``string`` | Partition key value | ``business-office`` |
183+
| **id** | ``string`` | Unique identifier | |
184+
| **name** | ``string`` | Name of the office | |
185+
| **location** | ``Point`` | GeoJSON geographical point | |
186+
| **category** | ``string`` | Partition key value | ``business-office`` |
187187
188188
```csharp
189189
using Microsoft.Azure.Cosmos.Spatial;
@@ -203,10 +203,10 @@ The .NET SDK includes multiple types in the [``Microsoft.Azure.Cosmos.Spatial``]
203203
204204
| | Type | Description | Default value |
205205
| --- | --- | --- | --- |
206-
| **``id``** | ``string`` | Unique identifier | |
207-
| **``name``** | ``string`` | Name of the office | |
208-
| **``location``** | ``Polygon`` | GeoJSON geographical shape | |
209-
| **``category``** | ``string`` | Partition key value | ``business-region`` |
206+
| **id** | ``string`` | Unique identifier | |
207+
| **name** | ``string`` | Name of the office | |
208+
| **location** | ``Polygon`` | GeoJSON geographical shape | |
209+
| **category** | ``string`` | Partition key value | ``business-region`` |
210210
211211
```csharp
212212
using Microsoft.Azure.Cosmos.Spatial;
@@ -226,8 +226,8 @@ The .NET SDK includes multiple types in the [``Microsoft.Azure.Cosmos.Spatial``]
226226
227227
| | Type | Description |
228228
| --- | --- | --- |
229-
| **``name``** | ``string`` | Name of the matched result |
230-
| **``distanceKilometers``** | ``decimal`` | Distance in kilometers |
229+
| **name** | ``string`` | Name of the matched result |
230+
| **distanceKilometers** | ``decimal`` | Distance in kilometers |
231231
232232
```csharp
233233
public record Result(
@@ -346,9 +346,9 @@ The types in the ``Microsoft.Azure.Cosmos.Spatial`` namespace can be used as inp
346346
347347
| | Value |
348348
| --- | --- |
349-
| **``@maxDistance``** | ``2000`` |
350-
| **``@partitionKey``** | ``"business-office"`` |
351-
| **``@compareLocation``** | ``new Point(-122.11758, 47.66901)`` |
349+
| **@maxDistance** | ``2000`` |
350+
| **@partitionKey** | ``"business-office"`` |
351+
| **@compareLocation** | ``new Point(-122.11758, 47.66901)`` |
352352
353353
```csharp
354354
var query = new QueryDefinition(nosqlString)
@@ -405,7 +405,6 @@ The [LINQ to NoSQL](query/linq-to-sql.md) functionality in the .NET SDK supports
405405
406406
```csharp
407407
Region region = await container.ReadItemAsync<Region>("1000", new PartitionKey("business-region"));
408-
409408
```
410409
411410
1. Use the [``Container.GetItemLinqQueryable<>``](/dotnet/api/microsoft.azure.cosmos.container.getitemlinqqueryable) method to get a LINQ queryable, and the build the LINQ query fluently by performing these three actions:
@@ -457,7 +456,7 @@ Remove your database after you complete this guide.
457456
458457
1. Open a terminal and create a shell variable for the name of your account and resource group.
459458
460-
```azurecli
459+
```azurecli-interactive
461460
# Variable for resource group name
462461
resourceGroupName="<name-of-your-resource-group>"
463462
@@ -467,7 +466,7 @@ Remove your database after you complete this guide.
467466
468467
1. Use [``az cosmosdb sql database delete``](/cli/azure/cosmosdb/sql/database#az-cosmosdb-sql-database-delete) to remove the database.
469468
470-
```azurecli
469+
```azurecli-interactive
471470
az cosmosdb sql database delete \
472471
--resource-group $resourceGroupName \
473472
--account-name $accountName \

0 commit comments

Comments
 (0)