Share via


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

IndexingPolicy 类

定义

表示 Azure Cosmos DB 服务中集合的索引策略配置。

public sealed class IndexingPolicy : Microsoft.Azure.Documents.JsonSerializable
type IndexingPolicy = class
    inherit JsonSerializable
Public NotInheritable Class IndexingPolicy
Inherits JsonSerializable
继承
IndexingPolicy
实现

注解

索引策略可用于配置包含/排除) JSON 路径 (属性、索引是一致更新还是脱机更新, (延迟) 、自动还是按文档选择加入,以及每个路径索引的精度和类型。

有关如何指定索引策略的其他信息,请参阅 。

构造函数

IndexingPolicy()

为 Azure Cosmos DB 服务初始化 类的新实例 IndexingPolicy

IndexingPolicy(Index[])

使用指定的索引集初始化 类的新实例 IndexingPolicy ,作为 Azure Cosmos DB 服务的根路径的默认索引规范。

属性

Automatic

获取或设置一个值,该值指示是否为 Azure Cosmos DB 服务中的集合启用自动索引。

CompositeIndexes

获取或设置附加复合索引

ExcludedPaths

获取或设置包含 ExcludedPath Azure Cosmos DB 服务中的 对象的集合。

IncludedPaths

获取或设置包含 IncludedPath Azure Cosmos DB 服务中的 对象的集合。

IndexingMode

获取或设置 azure Cosmos DB 服务中 (一致或延迟) 的索引模式。

SpatialIndexes

获取或设置附加空间索引

方法

Clone()

为 Azure Cosmos DB 服务执行索引策略的深层复制。

LoadFrom(JsonReader)

从 Azure Cosmos DB 服务中的指定 JSON 读取器加载对象。

(继承自 JsonSerializable)
LoadFrom(JsonReader, JsonSerializerSettings)

从 Azure Cosmos DB 服务中的指定 JSON 读取器加载对象。

(继承自 JsonSerializable)
SaveTo(Stream, SerializationFormattingPolicy)

将 对象保存到 Azure Cosmos DB 服务中的指定流。

(继承自 JsonSerializable)
SaveTo(Stream, SerializationFormattingPolicy, JsonSerializerSettings)

将 对象保存到 Azure Cosmos DB 服务中的指定流。

(继承自 JsonSerializable)
ToString()

返回 Azure Cosmos DB 服务中对象的字符串表示形式。

(继承自 JsonSerializable)

适用于

另请参阅