Created
August 8, 2022 10:16
-
-
Save sajeetharan/c4c7dd2d2ce7973eb891919a854cb522 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ipath1 = New-AzCosmosDBSqlIncludedPathIndex -DataType String -Precision -1 -Kind Hash | |
$ipath2 = New-AzCosmosDBSqlIncludedPathIndex -DataType String -Precision -1 -Kind Hash | |
$IncludedPath = New-AzCosmosDBSqlIncludedPath -Path "/*" -Index $ipath1, $ipath2 | |
$SpatialSpec = New-AzCosmosDBSqlSpatialSpec -Path "/mySpatialPath/*" -Type "Point", "LineString", "Polygon", "MultiPolygon" | |
$cp1 = New-AzCosmosDBSqlCompositePath -Path "/abc" -Order Ascending | |
$cp2 = New-AzCosmosDBSqlCompositePath -Path "/aberc" -Order Descending | |
$compositePath = (($cp1, $cp2), ($cp2, $cp1)) | |
New-AzCosmosDBSqlIndexingPolicy -IncludedPath $IncludedPath -SpatialSpec $SpatialSpec -CompositePath $compositePath -ExcludedPath "/myPathToNotIndex/*" -Automatic 1 -IndexingMode Consistent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment