Index 类
定义
Represents the index of a collection in the Azure Cosmos DB database service.
public class Index extends JsonSerializable
- 继承
继承成员
构造函数
Index(IndexKind indexKind) |
Constructor.
|
Index(JSONObject jsonObject, IndexKind indexKind) |
Constructor.
|
Index(String jsonString, IndexKind indexKind) |
Constructor.
|
方法
getKind() |
Gets index kind.
|
Hash(DataType dataType) |
Returns an instance of HashIndex class with specified DataType. Here is an example to create HashIndex instance passing in the DataType:
|
Hash(DataType dataType, int precision) |
Returns an instance of HashIndex class with specified DataType and precision. Here is an example to create HashIndex instance passing in the DataType and precision: HashIndex hashIndex = Index.Hash(DataType.String, 3);
|
Range(DataType dataType) |
Returns an instance of RangeIndex class with specified DataType. Here is an example to create RangeIndex instance passing in the DataType:
|
Range(DataType dataType, int precision) |
Returns an instance of RangeIndex class with specified DataType and precision. Here is an example to create RangeIndex instance passing in the DataType and precision:
|
Spatial(DataType dataType) |
Returns an instance of SpatialIndex class with specified DataType. Here is an example to create SpatialIndex instance passing in the DataType: SpatialIndex spatialIndex = Index.Spatial(DataType.Point);
|