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

HashIndex 构造函数

定义

重载

HashIndex(DataType)

使用 Azure Cosmos DB 服务的指定 DataType 初始化 类的新实例 HashIndex

HashIndex(DataType, Int16)

使用 Azure Cosmos DB 服务的指定 DataType 和精度初始化 类的新实例 HashIndex

HashIndex(DataType)

使用 Azure Cosmos DB 服务的指定 DataType 初始化 类的新实例 HashIndex

public HashIndex (Microsoft.Azure.Documents.DataType dataType);
new Microsoft.Azure.Documents.HashIndex : Microsoft.Azure.Documents.DataType -> Microsoft.Azure.Documents.HashIndex
Public Sub New (dataType As DataType)

参数

dataType
DataType

指定索引路径规范的目标数据类型。

示例

下面是实例化传入 DataType 的 HashIndex 类的示例:

HashIndex hashIndex = new HashIndex(DataType.String);

另请参阅

适用于

HashIndex(DataType, Int16)

使用 Azure Cosmos DB 服务的指定 DataType 和精度初始化 类的新实例 HashIndex

public HashIndex (Microsoft.Azure.Documents.DataType dataType, short precision);
new Microsoft.Azure.Documents.HashIndex : Microsoft.Azure.Documents.DataType * int16 -> Microsoft.Azure.Documents.HashIndex
Public Sub New (dataType As DataType, precision As Short)

参数

dataType
DataType

指定索引路径规范的目标数据类型。

precision
Int16

指定要用于与此索引关联的数据类型的精度。

示例

下面是实例化传入 DataType 和精度的 HashIndex 类的示例:

HashIndex hashIndex = new HashIndex(DataType.String, 3);

另请参阅

适用于