Index.Hash Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Hash(DataType) |
Returns an instance of the HashIndex class with specified DataType for the Azure Cosmos DB service. |
Hash(DataType, Int16) |
Returns an instance of the HashIndex class with specified DataType and precision for the Azure Cosmos DB service. |
Hash(DataType)
Returns an instance of the HashIndex class with specified DataType for the Azure Cosmos DB service.
public static Microsoft.Azure.Documents.HashIndex Hash (Microsoft.Azure.Documents.DataType dataType);
static member Hash : Microsoft.Azure.Documents.DataType -> Microsoft.Azure.Documents.HashIndex
Public Shared Function Hash (dataType As DataType) As HashIndex
Parameters
- dataType
- DataType
Specifies the target data type for the index path specification.
Returns
An instance of HashIndex type.
Examples
Here is an example to create HashIndex instance passing in the DataType:
HashIndex hashIndex = Index.Hash(DataType.String);
See also
Applies to
Hash(DataType, Int16)
Returns an instance of the HashIndex class with specified DataType and precision for the Azure Cosmos DB service.
public static Microsoft.Azure.Documents.HashIndex Hash (Microsoft.Azure.Documents.DataType dataType, short precision);
static member Hash : Microsoft.Azure.Documents.DataType * int16 -> Microsoft.Azure.Documents.HashIndex
Public Shared Function Hash (dataType As DataType, precision As Short) As HashIndex
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.
Returns
An instance of HashIndex type.
Examples
Here is an example to create HashIndex instance passing in the DataType and precision:
HashIndex hashIndex = Index.Hash(DataType.String, 3);