Table of Contents

Class RangeIndex

Namespace
Microsoft.Azure.Documents
Assembly
Microsoft.Azure.Documents.Client.dll

Specifies an instance of the RangeIndex class in the Azure Cosmos DB service.

public sealed class RangeIndex : Index, ICloneable
Inheritance
RangeIndex
Implements
Inherited Members
Extension Methods

Remarks

Can be used to serve queries like: SELECT * FROM docs d WHERE d.prop > 5.

Constructors

RangeIndex(DataType)

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

public RangeIndex(DataType dataType)

Parameters

dataType DataType

Specifies the target data type for the index path specification.

Examples

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

RangeIndex rangeIndex = new RangeIndex(DataType.Number);
See Also

RangeIndex(DataType, short)

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

public RangeIndex(DataType dataType, short precision)

Parameters

dataType DataType

Specifies the target data type for the index path specification.

precision short

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

Examples

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

RangeIndex rangeIndex = new RangeIndex(DataType.Number, -1);
See Also

Properties

DataType

Gets or sets the data type for which this index should be applied in the Azure Cosmos DB service.

public DataType DataType { get; set; }

Property Value

DataType

The data type for which this index should be applied.

Remarks

Precision

Gets or sets the precision for this particular index in the Azure Cosmos DB service.

public short? Precision { get; set; }

Property Value

short?

The precision for this particular index. Returns null, if not set.

Remarks

Methods

Clone()

Creates a copy of the range index for the Azure Cosmos DB service.

public object Clone()

Returns

object

A clone of the range index.