Sdílet prostřednictvím


HashIndex Constructors

Definition

Overloads

HashIndex(DataType)

Initializes a new instance of the HashIndex class with specified DataType for the Azure Cosmos DB service.

HashIndex(DataType, Int16)

Initializes a new instance of the HashIndex class with specified DataType and precision for the Azure Cosmos DB service.

HashIndex(DataType)

Initializes a new instance of the HashIndex class with specified DataType for the Azure Cosmos DB service.

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)

Parameters

dataType
DataType

Specifies the target data type for the index path specification.

Examples

Here is an example to instantiate HashIndex class passing in the DataType:

HashIndex hashIndex = new HashIndex(DataType.String);

See also

Applies to

HashIndex(DataType, Int16)

Initializes a new instance of the HashIndex class with specified DataType and precision for the Azure Cosmos DB service.

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)

Parameters

dataType
DataType

Specifies the target data type for the index path specification.

precision
Int16

Specifies the precision to be used for the data type associated with this index.

Examples

Here is an example to instantiate HashIndex class passing in the DataType and precision:

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

See also

Applies to