New-AzCosmosDBGremlinIndexingPolicy

Hiermee maakt u een nieuw CosmosDB IndexingPolicy-object.

Syntax

New-AzCosmosDBGremlinIndexingPolicy
   [-IncludedPath <PSIncludedPath[]>]
   [-SpatialSpec <PSSpatialSpec[]>]
   [-CompositePath <PSCompositePath[][]>]
   [-ExcludedPath <String[]>]
   [-Automatic <Boolean>]
   [-IndexingMode <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

De cmdlet New-AzCosmosDBGremlinIndexingPolicy maakt een nieuw object van het type PSIndexingPolicy.

Voorbeelden

Voorbeeld 1

$ipath1 = New-AzCosmosDBGremlinIncludedPathIndex -DataType String -Precision -1 -Kind Hash
$ipath2 = New-AzCosmosDBGremlinIncludedPathIndex -DataType String -Precision -1 -Kind Hash
$IncludedPath = New-AzCosmosDBGremlinIncludedPath -Path "/*" -Index $ipath1, $ipath2
$SpatialSpec = New-AzCosmosDBGremlinSpatialSpec -Path  "/mySpatialPath/*" -Type  "Point", "LineString", "Polygon", "MultiPolygon"
$cp1 = New-AzCosmosDBGremlinCompositePath -Path "/abc" -Order Ascending
$cp2 = New-AzCosmosDBGremlinCompositePath -Path "/aberc" -Order Descending
$compositePath = (($cp1, $cp2), ($cp2, $cp1))
New-AzCosmosDBGremlinIndexingPolicy -IncludedPath $IncludedPath -SpatialSpec $SpatialSpec -CompositePath $compositePath -ExcludedPath "/myPathToNotIndex/*" -Automatic 1 -IndexingMode Consistent

Automatic        : True
IndexingMode     : Consistent
IncludedPaths    : {Microsoft.Azure.Commands.CosmosDB.Models.PSIncludedPath}
ExcludedPaths    : {Microsoft.Azure.Commands.CosmosDB.Models.PSExcludedPath}
CompositeIndexes : {Microsoft.Azure.Commands.CosmosDB.Models.PSCompositePath Microsoft.Azure.Commands.CosmosDB.Models.PSCompositePath,
                   Microsoft.Azure.Commands.CosmosDB.Models.PSCompositePath Microsoft.Azure.Commands.CosmosDB.Models.PSCompositePath}
SpatialIndexes   : {Microsoft.Azure.Commands.CosmosDB.Models.PSSpatialSpec}

Parameters

-Automatic

Bool om aan te geven of het indexeringsbeleid automatisch is

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CompositePath

Matrix van matrix van objecten van het type Microsoft.Azure.Commands.CosmosDB.PSCompositePath

Type:PSCompositePath[][]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExcludedPath

Matrix van tekenreeksen met excludedPath(Hiermee geeft u een pad op binnen een JSON-document dat moet worden uitgesloten in de Azure Cosmos DB-service.) elementen.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IncludedPath

Matrix van tekenreeksen met includedPath (Hiermee geeft u een pad in een JSON-document op dat moet worden opgenomen in de Azure Cosmos DB-service.) elementen.

Type:PSIncludedPath[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IndexingMode

Geeft de indexeringsmodus aan. Mogelijke waarden zijn: 'Consistent', 'Luie', 'Geen'

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SpatialSpec

Matrix van objecten van het type Microsoft.Azure.Commands.CosmosDB.PSSpatialSpec

Type:PSSpatialSpec[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Invoerwaarden

None

Uitvoerwaarden

PSIndexingPolicy