Sdílet prostřednictvím


IndexingPolicy Class

Definition

Represents the indexing policy configuration for a collection in the Azure Cosmos DB service.

public sealed class IndexingPolicy : Microsoft.Azure.Documents.JsonSerializable
type IndexingPolicy = class
    inherit JsonSerializable
Public NotInheritable Class IndexingPolicy
Inherits JsonSerializable
Inheritance
IndexingPolicy
Implements

Remarks

Indexing policies can used to configure which properties (JSON paths) are included/excluded, whether the index is updated consistently or offline (lazy), automatic vs. opt-in per-document, as well as the precision and type of index per path.

Refer to for additional information on how to specify indexing policies.

Constructors

IndexingPolicy()

Initializes a new instance of the IndexingPolicy class for the Azure Cosmos DB service.

IndexingPolicy(Index[])

Initializes a new instance of the IndexingPolicy class with the specified set of indexes as default index specifications for the root path for the Azure Cosmos DB service.

Properties

Automatic

Gets or sets a value that indicates whether automatic indexing is enabled for a collection in the Azure Cosmos DB service.

CompositeIndexes

Gets or sets the additonal composite indexes

ExcludedPaths

Gets or sets the collection containing ExcludedPath objects in the Azure Cosmos DB service.

IncludedPaths

Gets or sets the collection containing IncludedPath objects in the Azure Cosmos DB service.

IndexingMode

Gets or sets the indexing mode (consistent or lazy) in the Azure Cosmos DB service.

SpatialIndexes

Gets or sets the additonal spatial indexes

Methods

Clone()

Performs a deep copy of the indexing policy for the Azure Cosmos DB service.

LoadFrom(JsonReader, JsonSerializerSettings)

Loads the object from the specified JSON reader in the Azure Cosmos DB service.

(Inherited from JsonSerializable)
LoadFrom(JsonReader)

Loads the object from the specified JSON reader in the Azure Cosmos DB service.

(Inherited from JsonSerializable)
SaveTo(Stream, SerializationFormattingPolicy, JsonSerializerSettings)

Saves the object to the specified stream in the Azure Cosmos DB service.

(Inherited from JsonSerializable)
SaveTo(Stream, SerializationFormattingPolicy)

Saves the object to the specified stream in the Azure Cosmos DB service.

(Inherited from JsonSerializable)
ToString()

Returns the string representation of the object in the Azure Cosmos DB service.

(Inherited from JsonSerializable)

Applies to

See also